Sort models list alphabetically

This commit is contained in:
Ryan Walder 2024-05-16 18:41:21 +01:00
parent 8f2106569c
commit ad51f737d1

View File

@ -203,9 +203,12 @@ def get_facemodels():
def get_model_names(get_models): def get_model_names(get_models):
models = get_models() models = get_models()
names = ["None"] names = []
for x in models: for x in models:
names.append(os.path.basename(x)) names.append(os.path.basename(x))
# Sort ignoring case during sort but retain in output
names.sort(key=str.lower)
names.insert(0, "None")
return names return names
def get_images_from_folder(path: str): def get_images_from_folder(path: str):