From 4df0a41564b2712fb5f41e23808e968494292beb Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Wed, 20 Nov 2024 00:37:38 +0100 Subject: [PATCH] updated --- lollms/app.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lollms/app.py b/lollms/app.py index 1b85363..ba15555 100644 --- a/lollms/app.py +++ b/lollms/app.py @@ -703,9 +703,13 @@ class LollmsApplication(LoLLMsCom): try: personality = PersonalityBuilder(self.lollms_paths, self.config, self.model, self, callback=callback).build_personality(id) if personality.model is not None: - self.cond_tk = personality.model.tokenize(personality.personality_conditioning) - self.n_cond_tk = len(self.cond_tk) - ASCIIColors.success(f"Personality {personality.name} mounted successfully") + try: + self.cond_tk = personality.model.tokenize(personality.personality_conditioning) + self.n_cond_tk = len(self.cond_tk) + ASCIIColors.success(f"Personality {personality.name} mounted successfully") + except: + self.cond_tk = [] + self.n_cond_tk = 0 else: ASCIIColors.success(f"Personality {personality.name} mounted successfully but no model is selected") except Exception as ex: