This commit is contained in:
Saifeddine ALOUI 2023-10-22 20:42:25 +02:00
parent 9358d18716
commit 38783aaae6

View File

@ -402,8 +402,12 @@ class MainMenu(Menu):
if (p/"binding_card.yaml").exists():
with open(p/"binding_card.yaml", "r") as f:
card = yaml.safe_load(f)
with open(p/"models.yaml", "r") as f:
models = yaml.safe_load(f)
models =[]
for accepted_model in card["accepted_models"]:
models_path = self.lollms_app.lollms_paths.models_zoo_path/f"{accepted_model}.yaml"
with open(models_path, "r") as f:
models += yaml.safe_load(f)
is_installed = (self.lollms_app.lollms_paths.personal_configuration_path/f"binding_{p.name}.yaml").exists()
entry=f"{ASCIIColors.color_green if is_installed else ''}{'*' if self.lollms_app.config['binding_name']==card['name'] else ''} {card['name']} (by {card['author']})"
bindings_list.append(entry)