Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ import sys
|
|
8 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
9 |
csv_path = os.path.join(current_dir, 'preferences.csv')
|
10 |
|
11 |
-
|
12 |
if not os.path.isfile(csv_path):
|
13 |
print(f"Error: 'preferences.csv' not found at {csv_path}")
|
14 |
sys.exit(1)
|
@@ -29,6 +29,9 @@ def show_image_pair(pair_id):
|
|
29 |
|
30 |
img1_path = os.path.join(current_dir, record['image1'])
|
31 |
img2_path = os.path.join(current_dir, record['image2'])
|
|
|
|
|
|
|
32 |
|
33 |
# Check if images exist
|
34 |
if not os.path.isfile(img1_path):
|
|
|
8 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
9 |
csv_path = os.path.join(current_dir, 'preferences.csv')
|
10 |
|
11 |
+
|
12 |
if not os.path.isfile(csv_path):
|
13 |
print(f"Error: 'preferences.csv' not found at {csv_path}")
|
14 |
sys.exit(1)
|
|
|
29 |
|
30 |
img1_path = os.path.join(current_dir, record['image1'])
|
31 |
img2_path = os.path.join(current_dir, record['image2'])
|
32 |
+
img1 = gr.Image(label="Image 1", elem_id="img1", width=300)
|
33 |
+
img2 = gr.Image(label="Image 2", elem_id="img2", width=300)
|
34 |
+
|
35 |
|
36 |
# Check if images exist
|
37 |
if not os.path.isfile(img1_path):
|