This commit is contained in:
Saifeddine ALOUI 2023-10-19 18:01:13 +02:00
parent 5205aa0aa4
commit 1f7b3b93d2
3 changed files with 24 additions and 10 deletions

View File

@ -49,6 +49,9 @@ class LollmsApplication:
# Pull the repository if it already exists
ASCIIColors.info("Extensions zoo found in your personal space.\nPulling last Extensions zoo")
subprocess.run(["git", "-C", self.lollms_paths.extensions_zoo_path, "pull"])
# Pull the repository if it already exists
ASCIIColors.info("Models zoo found in your personal space.\nPulling last Models zoo")
subprocess.run(["git", "-C", self.lollms_paths.models_zoo_path, "pull"])
except Exception as ex:
ASCIIColors.error("Couldn't pull zoos. Please contact the main dev on our discord channel and report the problem.")
trace_exception(ex)

View File

@ -15,6 +15,7 @@ lollms_extensions_zoo_path = lollms_path / "extensions_zoo"
personalities_zoo_repo = "https://github.com/ParisNeo/lollms_personalities_zoo.git"
bindings_zoo_repo = "https://github.com/ParisNeo/lollms_bindings_zoo.git"
extensions_zoo_repo = "https://github.com/ParisNeo/lollms_extensions_zoo.git"
models_zoo_repo = "https://github.com/ParisNeo/models_zoo.git"
gptqlora_repo = "https://github.com/ParisNeo/gptqlora.git"
# Now we speify the personal folders
@ -47,7 +48,9 @@ class LollmsPaths:
self.personal_user_infos_path = self.personal_path / "user_infos"
self.personal_trainers_path = self.personal_path / "trainers"
self.gptqlora_path = self.personal_trainers_path / "gptqlora"
self.gptqlora_path = self.personal_trainers_path / "gptqlora"
self.custom_personalities_path = self.personal_path / "custom_personalities"
self.binding_models_paths = []
@ -65,22 +68,24 @@ class LollmsPaths:
self.models_zoo_path = self.execution_path/ "models_zoo"
ASCIIColors.green("----------------------Paths information-----------------------")
ASCIIColors.yellow("personal_path:",end="")
ASCIIColors.red("personal_path:",end="")
ASCIIColors.yellow(f"{self.personal_path}")
ASCIIColors.yellow("personal_configuration_path:",end="")
ASCIIColors.red("personal_configuration_path:",end="")
ASCIIColors.yellow(f"{self.personal_configuration_path}")
ASCIIColors.yellow("personal_databases_path:",end="")
ASCIIColors.red("personal_databases_path:",end="")
ASCIIColors.yellow(f"{self.personal_databases_path}")
ASCIIColors.yellow("personal_models_path:",end="")
ASCIIColors.red("personal_models_path:",end="")
ASCIIColors.yellow(f"{self.personal_models_path}")
ASCIIColors.yellow("personal_user_infos_path:",end="")
ASCIIColors.red("personal_user_infos_path:",end="")
ASCIIColors.yellow(f"{self.personal_user_infos_path}")
ASCIIColors.yellow("personal_trainers_path:",end="")
ASCIIColors.red("personal_trainers_path:",end="")
ASCIIColors.yellow(f"{self.personal_trainers_path}")
ASCIIColors.yellow("personal_trainers_path:",end="")
ASCIIColors.red("personal_trainers_path:",end="")
ASCIIColors.yellow(f"{self.gptqlora_path}")
ASCIIColors.yellow("personal_data_path:",end="")
ASCIIColors.red("personal_data_path:",end="")
ASCIIColors.yellow(f"{self.personal_data_path}")
ASCIIColors.red("custom_personalities_path:",end="")
ASCIIColors.yellow(f"{self.custom_personalities_path}")
ASCIIColors.green("-------------------------------------------------------------")
self.create_directories()
self.copy_default_config()
@ -118,6 +123,7 @@ class LollmsPaths:
self.personal_uploads_path.mkdir(parents=True, exist_ok=True)
self.personal_user_infos_path.mkdir(parents=True, exist_ok=True)
self.personal_trainers_path.mkdir(parents=True, exist_ok=True)
self.custom_personalities_path.mkdir(parents=True, exist_ok=True)
if not self.bindings_zoo_path.exists():
@ -135,6 +141,11 @@ class LollmsPaths:
ASCIIColors.info("No extensions found in your personal space.\nCloning the extensions zoo")
subprocess.run(["git", "clone", extensions_zoo_repo, self.extensions_zoo_path])
if not self.models_zoo_path.exists():
# Clone the repository to the target path
ASCIIColors.info("No models found in your personal space.\nCloning the models zoo")
subprocess.run(["git", "clone", models_zoo_repo, self.models_zoo_path])
def copy_default_config(self):

View File

@ -312,7 +312,7 @@ class MainMenu(Menu):
ASCIIColors.green(personality)
else:
ASCIIColors.yellow(personality)
personality_categories = [p.stem for p in (self.lollms_app.lollms_paths.personalities_zoo_path).iterdir() if p.is_dir() and not p.name.startswith(".")]+["Back"]
personality_categories = [p.stem for p in (self.lollms_app.lollms_paths.personalities_zoo_path).iterdir() if p.is_dir() and not p.name.startswith(".")]+["Custom personalities","Back"]
print("Select category")
choice = self.show_menu(personality_categories)
if 1 <= choice <= len(personality_categories)-1: