From 659557c97400353db86f8a8937c212820bcaa32a Mon Sep 17 00:00:00 2001 From: Colin Date: Sun, 30 Jul 2023 22:02:58 -0400 Subject: [PATCH] Add defaulting to english when no argument for language is given --- app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app.py b/app.py index cfa2d932..3931613e 100644 --- a/app.py +++ b/app.py @@ -775,12 +775,16 @@ class LoLLMsWebUI(LoLLMsAPPI): def list_personalities_categories(self): language = request.args.get('language') + if language is None: + language = 'english' personalities_categories_dir = self.lollms_paths.personalities_zoo_path/f'{language}' # replace with the actual path to the models folder personalities_categories = [f.stem for f in personalities_categories_dir.iterdir() if f.is_dir() and not f.name.startswith(".")] return jsonify(personalities_categories) def list_personalities(self): language = request.args.get('language') + if language is None: + language = 'english' category = request.args.get('category') if not category: return jsonify([])