fixed bugs

This commit is contained in:
Saifeddine ALOUI 2023-06-23 01:02:02 +02:00
parent cdcc2801b5
commit 97105865e4
2 changed files with 5 additions and 10 deletions

View File

@ -125,11 +125,8 @@ class MainMenu:
models_dir:Path = (self.lollms_app.lollms_paths.personal_models_path/self.lollms_app.config['binding_name'])
models_dir.mkdir(parents=True, exist_ok=True)
if hasattr(self.lollms_app,"binding") and hasattr(self.lollms_app.binding,"list_models"):
models_list = [f'{v["filename"]} (by {v["owner"]})' for v in self.lollms_app.binding.list_models(self.lollms_app.config)] + ["Install model", "Change binding", "Back"]
else:
models_list = [m.name for m in models_dir.iterdir() if m.name.lower() not in [".ds_dtore","thumb.db",".keep"]] + ["Install model", "Change binding", "Back"]
models_list = [v for v in self.lollms_app.binding.list_models(self.lollms_app.config)] + ["Install model", "Change binding", "Back"]
choice = self.show_menu(models_list)
if 1 <= choice <= len(models_list)-3:
print(f"You selected model: {ASCIIColors.color_green}{models_list[choice - 1]}{ASCIIColors.color_reset}")
@ -294,14 +291,12 @@ class Conversation(LollmsApplication):
self.menu = MainMenu(self)
# load binding
self.load_binding()
if self.config.model_name is None:
self.menu.select_model()
# load binding
self.load_binding()
# Load model
self.load_model()
# cfg.binding_name = llm_binding.binding_folder_name

View File

@ -26,7 +26,7 @@ def get_all_files(path):
setuptools.setup(
name="lollms",
version="2.0.21",
version="2.0.23",
author="Saifeddine ALOUI",
author_email="aloui.saifeddine@gmail.com",
description="A python library for AI personality definition",