moved ttv to new zoo

This commit is contained in:
Saifeddine ALOUI 2025-03-08 01:39:35 +01:00
parent 9935b4bc4e
commit 34d090b755
2 changed files with 5 additions and 17 deletions

View File

@ -685,8 +685,7 @@ class LollmsApplication(LoLLMsCom):
ASCIIColors.execute_with_animation("Loading loacal TTI services", start_tti, ASCIIColors.color_blue)
def start_ttv(*args, **kwargs):
self.ttv = self.load_class_from_folder(self.lollms_paths.personal_services_path, self.config.active_ttv_service)
self.ttv = self.load_class_from_folder(self.lollms_paths.services_zoo_path, self.config.active_ttv_service)
ASCIIColors.execute_with_animation("Loading loacal TTV services", start_ttv, ASCIIColors.color_blue)
@ -802,25 +801,14 @@ class LollmsApplication(LoLLMsCom):
def start_ttv(*args, **kwargs):
if self.config.active_ttv_service == "lumalabs" and (self.ttv is None or self.ttv.name!="lumalabs"):
try:
from lollms.services.ttv.lumalabs.lollms_lumalabs import LollmsLumaLabs
self.ttv = LollmsLumaLabs(self, self.config.lumalabs_key)
except:
self.warning(f"Couldn't create lumalabs binding")
if self.config.active_ttv_service == "novita_ai" and (self.ttv is None or self.ttv.name!="novita_ai"):
try:
from lollms.services.ttv.novita_ai.lollms_novita_ai import LollmsNovitaAITextToVideo
self.ttv = LollmsNovitaAITextToVideo(self,None)
except Exception as ex:
trace_exception(ex)
self.warning(f"Couldn't create novita ai binding")
self.ttv = self.load_class_from_folder(self.lollms_paths.services_zoo_path, self.config.active_ttv_service)
ASCIIColors.execute_with_animation("Loading loacal TTV services", start_ttv, ASCIIColors.color_blue)
print("OK")
except Exception as ex:
trace_exception(ex)

View File

@ -45,7 +45,7 @@ async def list_ttv_services(request: ServiceListingRequest) -> List[Dict[str, st
check_access(lollmsElfServer, request.client_id)
# Get the services directory path
services_path = lollmsElfServer.lollms_paths.services_zoo_path
services_path = lollmsElfServer.lollms_paths.services_zoo_path/"ttv"
# Initialize empty list for services
ttv_services = []
@ -56,7 +56,7 @@ async def list_ttv_services(request: ServiceListingRequest) -> List[Dict[str, st
# Iterate through subfolders
for service_folder in services_path.iterdir():
if service_folder.is_dir():
if service_folder.is_dir() and service_folder.stem not in [".git", ".vscode"]:
# Look for config.yaml in each subfolder
config_file = service_folder / "config.yaml"
if config_file.exists():