Case-insensitive sorting for the list of themes

This commit is contained in:
khusain
2023-05-14 10:53:04 -04:00
parent 89d0a841f3
commit 730bb8335c
+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