Spaces:
Running
Running
Sort sample images by name
Browse files- app.py +2 -0
- samples/01.jpg +0 -0
- samples/07.jpg +0 -0
app.py
CHANGED
@@ -10,6 +10,8 @@ import tensorflow as tf
|
|
10 |
|
11 |
def get_sample_images():
|
12 |
list_ = glob.glob(os.path.join(os.path.dirname(__file__), 'samples/*.jpg'))
|
|
|
|
|
13 |
return [[i] for i in list_]
|
14 |
|
15 |
|
|
|
10 |
|
11 |
def get_sample_images():
|
12 |
list_ = glob.glob(os.path.join(os.path.dirname(__file__), 'samples/*.jpg'))
|
13 |
+
# sort by name
|
14 |
+
list_.sort(key=lambda x: int(x.split('/')[-1].split('.')[0]))
|
15 |
return [[i] for i in list_]
|
16 |
|
17 |
|
samples/01.jpg
CHANGED
samples/07.jpg
ADDED