Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def load_example_image_groups(directory):
|
|
30 |
if os.path.isdir(subdir_path):
|
31 |
example_groups[subdir] = []
|
32 |
images = [f for f in os.listdir(subdir_path) if f.lower().endswith(('.png', '.jpg', '.jpeg'))]
|
33 |
-
images
|
34 |
for filename in images:
|
35 |
img = Image.open(os.path.join(subdir_path, filename))
|
36 |
example_groups[subdir].append(img)
|
|
|
30 |
if os.path.isdir(subdir_path):
|
31 |
example_groups[subdir] = []
|
32 |
images = [f for f in os.listdir(subdir_path) if f.lower().endswith(('.png', '.jpg', '.jpeg'))]
|
33 |
+
images = natsorted(images, key=natural_sort_key)
|
34 |
for filename in images:
|
35 |
img = Image.open(os.path.join(subdir_path, filename))
|
36 |
example_groups[subdir].append(img)
|