Spaces:
Runtime error
Runtime error
Commit ·
8a1a659
1
Parent(s): b6ecd1a
dc dc
Browse files
app.py
CHANGED
|
@@ -119,6 +119,7 @@ def main():
|
|
| 119 |
count = user_state if isinstance(user_state, int) else user_state.value
|
| 120 |
if count < config['dataset'][config['dataset']['name']]['n_classes']:
|
| 121 |
img_id = img_ids[-1] if isinstance(img_ids[-1], int) else img_ids[-1].value
|
|
|
|
| 122 |
images = load_image_and_saliency(count, data_dir, img_id)
|
| 123 |
target_img = gr.Image(images[0], elem_classes="main-image", visible=True)
|
| 124 |
saliency_gradcam = gr.Image(images[1], elem_classes="main-image", visible=True)
|
|
|
|
| 119 |
count = user_state if isinstance(user_state, int) else user_state.value
|
| 120 |
if count < config['dataset'][config['dataset']['name']]['n_classes']:
|
| 121 |
img_id = img_ids[-1] if isinstance(img_ids[-1], int) else img_ids[-1].value
|
| 122 |
+
print(f"Updating saliency maps for class index: {count} and image ID: {img_id}")
|
| 123 |
images = load_image_and_saliency(count, data_dir, img_id)
|
| 124 |
target_img = gr.Image(images[0], elem_classes="main-image", visible=True)
|
| 125 |
saliency_gradcam = gr.Image(images[1], elem_classes="main-image", visible=True)
|