Spaces:
Sleeping
Sleeping
fix bug with images
Browse files
app.py
CHANGED
@@ -41,6 +41,8 @@ def load_random_images():
|
|
41 |
for i in range(RANDOM_IMAGES_TO_SHOW):
|
42 |
idx = np.random.randint(0, len(data_df))
|
43 |
p = os.path.join(IMAGE_PATH, data_df.iloc[idx]['path'])
|
|
|
|
|
44 |
animal = data_df.iloc[idx]['target']
|
45 |
print(p)
|
46 |
if os.path.exists(p):
|
|
|
41 |
for i in range(RANDOM_IMAGES_TO_SHOW):
|
42 |
idx = np.random.randint(0, len(data_df))
|
43 |
p = os.path.join(IMAGE_PATH, data_df.iloc[idx]['path'])
|
44 |
+
p = p.replace('\\', '/')
|
45 |
+
p = p.replace('//', '/')
|
46 |
animal = data_df.iloc[idx]['target']
|
47 |
print(p)
|
48 |
if os.path.exists(p):
|