Spaces:
Running on CPU Upgrade

osv5m commited on
Commit
34cb119
·
verified ·
1 Parent(s): 1a8dd8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -285,6 +285,10 @@ class Engine(object):
285
  # Load the CSV
286
  df = pd.read_csv(csv_file)
287
 
 
 
 
 
288
  # order
289
  self.order = np.arange(len(df))
290
  np.random.shuffle(self.order) # Shuffle the order array
@@ -293,9 +297,6 @@ class Engine(object):
293
  df = df.iloc[self.order].reset_index(drop=True)
294
 
295
  # Put image with id 732681614433401 on the top and then all the rest below
296
- df['id'] = df['id'].astype(str)
297
- #df = pd.concat([df[df['id'] == '495204901603170'], df[df['id'] != '495204901603170']])
298
- #df = pd.concat([df[df['id'] == '732681614433401'], df[df['id'] != '732681614433401']])
299
 
300
  # Get the image filenames and their coordinates
301
  self.images = [os.path.join(self.image_folder, f"{img_path}.jpg") for img_path in df['id'].tolist()[:]]
 
285
  # Load the CSV
286
  df = pd.read_csv(csv_file)
287
 
288
+ df['id'] = df['id'].astype(str)
289
+ df = pd.concat([df[df['id'] == '495204901603170'], df[df['id'] != '495204901603170']])
290
+ df = pd.concat([df[df['id'] == '732681614433401'], df[df['id'] != '732681614433401']])
291
+
292
  # order
293
  self.order = np.arange(len(df))
294
  np.random.shuffle(self.order) # Shuffle the order array
 
297
  df = df.iloc[self.order].reset_index(drop=True)
298
 
299
  # Put image with id 732681614433401 on the top and then all the rest below
 
 
 
300
 
301
  # Get the image filenames and their coordinates
302
  self.images = [os.path.join(self.image_folder, f"{img_path}.jpg") for img_path in df['id'].tolist()[:]]