Skip to content

Commit

Permalink
Merge pull request oobabooga#325 from Ph0rk0z/fix-RWKV-Names
Browse files Browse the repository at this point in the history
Fix rwkv names
  • Loading branch information
oobabooga authored Mar 15, 2023
2 parents cf2da86 + 3b62bd1 commit ffc6cb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def get_available_models():
if shared.args.flexgen:
return sorted([re.sub('-np$', '', item.name) for item in list(Path('models/').glob('*')) if item.name.endswith('-np')], key=str.lower)
else:
return sorted([item.name for item in list(Path('models/').glob('*')) if not item.name.endswith(('.txt', '-np', '.pt'))], key=str.lower)
return sorted([re.sub('.pth$', '', item.name) for item in list(Path('models/').glob('*')) if not item.name.endswith(('.txt', '-np', '.pt', '.json'))], key=str.lower)

def get_available_presets():
return sorted(set(map(lambda x : '.'.join(str(x.name).split('.')[:-1]), Path('presets').glob('*.txt'))), key=str.lower)
Expand Down

0 comments on commit ffc6cb3

Please sign in to comment.