upgraded code

This commit is contained in:
Saifeddine ALOUI 2023-06-22 20:05:37 +02:00
parent 563e652911
commit 56e2f79a66
2 changed files with 3 additions and 6 deletions

View File

@ -170,16 +170,13 @@ class MainMenu:
if 1 <= choice <= len(personality_languages)-1:
language = personality_languages[choice - 1]
print(f"You selected language: {ASCIIColors.color_green}{language}{ASCIIColors.color_reset}")
personality_categories = [p.stem for p in (self.lollms_app.lollms_paths.personalities_zoo_path/language).iterdir() if p.is_dir()]+["Custom","Back"]
personality_categories = [p.stem for p in (self.lollms_app.lollms_paths.personalities_zoo_path/language).iterdir() if p.is_dir()]+["Back"]
print("Select category")
choice = self.show_menu(personality_categories)
if 1 <= choice <= len(personality_categories)-1:
category = personality_categories[choice - 1]
print(f"You selected category: {ASCIIColors.color_green}{category}{ASCIIColors.color_reset}")
if category=="Custom":
personality_names = [p.stem for p in self.lollms_app.lollms_paths.personal_personalities_path.iterdir() if p.is_dir()]+["Back"]
else:
personality_names = [p.stem for p in (self.lollms_app.lollms_paths.personalities_zoo_path/language/category).iterdir() if p.is_dir()]+["Back"]
personality_names = [p.stem for p in (self.lollms_app.lollms_paths.personalities_zoo_path/language/category).iterdir() if p.is_dir()]+["Back"]
print("Select personality")
choice = self.show_menu(personality_names)
if 1 <= choice <= len(personality_names)-1:

View File

@ -68,7 +68,7 @@ class LollmsPaths:
if not self.bindings_zoo_path.exists():
# Clone the repository to the target path
ASCIIColors.info("No personalities found in your personal space.\nCloning the personalities zoo")
subprocess.run(["git", "clone", personalities_zoo_repo, self.bindings_zoo_path])
subprocess.run(["git", "clone", bindings_zoo_repo, self.bindings_zoo_path])
else:
# Pull the repository if it already exists
ASCIIColors.info("Personalities zoo found in your personal space.\nPulling last personalities zoo")