Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ParisNeo committed Aug 2, 2023
2 parents 2e86af9 + a78f8aa commit 4ed1be3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,12 +776,16 @@ def list_personalities_languages(self):

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([])
Expand Down

0 comments on commit 4ed1be3

Please sign in to comment.