noahzhy commited on
Commit
074635e
1 Parent(s): cb30e70

Sort sample images by name

Browse files
Files changed (3) hide show
  1. app.py +2 -0
  2. samples/01.jpg +0 -0
  3. 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