Merge pull request #944 from khusain/case-insensitive-theme-list

Case-insensitive sorting for theme list
This commit is contained in:
Vladimir Mandic
2023-05-14 11:02:53 -04:00
committed by GitHub
+1 -1
View File
@@ -211,7 +211,7 @@ def list_themes():
else:
res = []
builtin = ["black-orange", "gradio/default", "gradio/base", "gradio/glass", "gradio/monochrome", "gradio/soft"]
themes = sorted(set(builtin + [x['id'] for x in res if x['status'] == 'RUNNING' and 'test' not in x['id'].lower()]))
themes = sorted(set(builtin + [x['id'] for x in res if x['status'] == 'RUNNING' and 'test' not in x['id'].lower()]), key=str.casefold)
return themes