This commit is contained in:
Saifeddine ALOUI 2023-08-01 14:18:59 +02:00
parent 0b6b1917ff
commit c68138042c

View File

@ -20,7 +20,7 @@ from lollms.binding import LOLLMSConfig, BindingBuilder, LLMBinding, ModelBuilde
from lollms.paths import LollmsPaths
from lollms.helpers import ASCIIColors, trace_exception
from lollms.app import LollmsApplication
from lollms.utilities import Image64BitsManager
from lollms.utilities import File64BitsManager
import multiprocessing as mp
import threading
import time
@ -432,12 +432,11 @@ class LoLLMsAPPI(LollmsApplication):
try:
self.personality.setCallback(partial(self.process_chunk,client_id = client_id))
ASCIIColors.info("Recovering file from front end")
file = Image64BitsManager.b642img(data["fileData"])
path:Path = self.lollms_paths.personal_uploads_path / self.personality.personality_folder_name
path.mkdir(parents=True, exist_ok=True)
file_path = path / data["filename"]
file.save( file_path )
File64BitsManager.b642file(data["fileData"],file_path)
if self.personality.processor:
self.personality.processor.add_file(file_path, self.process_chunk)