Update app.py
Browse files
app.py
CHANGED
|
@@ -378,7 +378,7 @@ def get_example_images():
|
|
| 378 |
|
| 379 |
def load_selected_example(evt: gr.SelectData):
|
| 380 |
"""Load the full-size version of the selected example image"""
|
| 381 |
-
if evt.index <
|
| 382 |
img_path = f"obj_{evt.index+1:02d}.jpg"
|
| 383 |
if os.path.exists(img_path):
|
| 384 |
return Image.open(img_path)
|
|
|
|
| 378 |
|
| 379 |
def load_selected_example(evt: gr.SelectData):
|
| 380 |
"""Load the full-size version of the selected example image"""
|
| 381 |
+
if evt.index < 16: # We have 8 example images
|
| 382 |
img_path = f"obj_{evt.index+1:02d}.jpg"
|
| 383 |
if os.path.exists(img_path):
|
| 384 |
return Image.open(img_path)
|