diff --git a/.gitignore b/.gitignore index abaaeea6..502283c9 100644 --- a/.gitignore +++ b/.gitignore @@ -151,7 +151,6 @@ configs/* # personalities other than the default one personalities/* -!personalities/english/general/gpt4all_chatbot/config.yaml # personalities other than the default one databases/* diff --git a/app.py b/app.py index 7b3d6ba7..43e73e89 100644 --- a/app.py +++ b/app.py @@ -309,8 +309,12 @@ class Gpt4AllWebUI(GPT4AllAPI): return jsonify(personalities_categories) def list_personalities(self): - personalities_dir = Path(f'./personalities/{self.config["personality_language"]}/{self.config["personality_category"]}') # replace with the actual path to the models folder - personalities = [f.stem for f in personalities_dir.iterdir() if f.is_dir()] + try: + personalities_dir = Path(f'./personalities/{self.config["personality_language"]}/{self.config["personality_category"]}') # replace with the actual path to the models folder + personalities = [f.stem for f in personalities_dir.iterdir() if f.is_dir()] + except: + personalities=[] + print("nope") return jsonify(personalities) def list_languages(self): diff --git a/requirements.txt b/requirements.txt index 2eabf83d..1ff6b98c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,6 +6,7 @@ pyyaml markdown pyllamacpp==2.1.1 gpt4all-j==0.2.1 +pygptj --find-links https://download.pytorch.org/whl/cu117 torch==2.0.0 torchvision