2024-01-01 03:18:49 +00:00
|
|
|
"""
|
|
|
|
File: lollms_web_ui.py
|
|
|
|
Author: ParisNeo
|
|
|
|
Description: Singleton class for the LoLLMS web UI.
|
|
|
|
|
|
|
|
This class provides a singleton instance of the LoLLMS web UI, allowing access to its functionality and data across multiple endpoints.
|
|
|
|
"""
|
|
|
|
|
2024-01-04 02:57:42 +00:00
|
|
|
from lollms.server.elf_server import LOLLMSElfServer
|
2024-01-01 03:18:49 +00:00
|
|
|
from lollms.main_config import LOLLMSConfig
|
|
|
|
from lollms.paths import LollmsPaths
|
|
|
|
|
2024-01-04 02:57:42 +00:00
|
|
|
class LOLLMSWebUI(LOLLMSElfServer):
|
2024-01-01 03:18:49 +00:00
|
|
|
def __init__(
|
|
|
|
self,
|
|
|
|
config: LOLLMSConfig,
|
|
|
|
lollms_paths: LollmsPaths,
|
|
|
|
load_binding=True,
|
|
|
|
load_model=True,
|
2024-01-04 02:57:42 +00:00
|
|
|
load_voice_service=True,
|
|
|
|
load_sd_service=True,
|
2024-01-01 03:18:49 +00:00
|
|
|
try_select_binding=False,
|
|
|
|
try_select_model=False,
|
|
|
|
callback=None,
|
|
|
|
socketio=None
|
|
|
|
) -> None:
|
|
|
|
super().__init__(
|
|
|
|
config,
|
|
|
|
lollms_paths,
|
|
|
|
load_binding=load_binding,
|
|
|
|
load_model=load_model,
|
2024-01-04 02:57:42 +00:00
|
|
|
load_sd_service=load_sd_service,
|
|
|
|
load_voice_service=load_voice_service,
|
2024-01-01 03:18:49 +00:00
|
|
|
try_select_binding=try_select_binding,
|
|
|
|
try_select_model=try_select_model,
|
|
|
|
callback=callback,
|
|
|
|
socketio=socketio
|
|
|
|
)
|
2024-01-04 02:57:42 +00:00
|
|
|
self.app_name = "LOLLMSWebUI"
|
2024-01-01 03:18:49 +00:00
|
|
|
|
|
|
|
# Other methods and properties of the LoLLMSWebUI singleton class
|