This commit is contained in:
Saifeddine ALOUI 2024-01-15 20:38:54 +01:00
parent 5346000836
commit 04a675c781
2 changed files with 5 additions and 1 deletions

2
app.py
View File

@ -58,7 +58,7 @@ if __name__ == "__main__":
if args.port: if args.port:
config.port=args.port config.port=args.port
LOLLMSWebUI.build_instance(config=config, lollms_paths=lollms_paths, socketio=sio) LOLLMSWebUI.build_instance(config=config, lollms_paths=lollms_paths, args=args, socketio=sio)
lollmsElfServer:LOLLMSWebUI = LOLLMSWebUI.get_instance() lollmsElfServer:LOLLMSWebUI = LOLLMSWebUI.get_instance()
# Import all endpoints # Import all endpoints
from lollms.server.endpoints.lollms_binding_files_server import router as lollms_binding_files_server_router from lollms.server.endpoints.lollms_binding_files_server import router as lollms_binding_files_server_router

View File

@ -94,6 +94,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
try_select_binding=False, try_select_binding=False,
try_select_model=False, try_select_model=False,
callback=None, callback=None,
args=None,
socketio = None socketio = None
): ):
if LOLLMSWebUI.__instance is None: if LOLLMSWebUI.__instance is None:
@ -107,6 +108,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
try_select_binding=try_select_binding, try_select_binding=try_select_binding,
try_select_model=try_select_model, try_select_model=try_select_model,
callback=callback, callback=callback,
args=args,
socketio=socketio socketio=socketio
) )
return LOLLMSWebUI.__instance return LOLLMSWebUI.__instance
@ -121,6 +123,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
try_select_binding=False, try_select_binding=False,
try_select_model=False, try_select_model=False,
callback=None, callback=None,
args=None,
socketio=None socketio=None
) -> None: ) -> None:
super().__init__( super().__init__(
@ -137,6 +140,7 @@ class LOLLMSWebUI(LOLLMSElfServer):
) )
self.app_name:str = "LOLLMSWebUI" self.app_name:str = "LOLLMSWebUI"
self.version:str = lollms_webui_version self.version:str = lollms_webui_version
self.args = args
self.busy = False self.busy = False