Spaces:
Running
Running
fix
Browse files
app.py
CHANGED
@@ -270,23 +270,23 @@ with gr.Blocks() as demo:
|
|
270 |
examples=[["data/images/CLEVR_default_000572.png", "data/images/CLEVR_semantic_000572.png"],
|
271 |
["data/images/CLEVR_default_003339.png", "data/images/CLEVR_semantic_003339.png"]],
|
272 |
inputs=[image_bef, image_aft],
|
273 |
-
outputs=[image_display_with_grid_bef, image_display_with_grid_aft],
|
274 |
label="Example Images",
|
275 |
-
fn=process_example,
|
276 |
examples_per_page=5
|
277 |
)
|
278 |
|
279 |
-
image_bef.change(
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
)
|
284 |
-
|
285 |
-
image_aft.change(
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
)
|
290 |
|
291 |
with gr.Column(scale=1):
|
292 |
# Output components
|
@@ -303,12 +303,12 @@ with gr.Blocks() as demo:
|
|
303 |
outputs=[prediction, selected_info_bef, selected_info_aft]
|
304 |
)
|
305 |
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
|
313 |
image_aft.change(
|
314 |
fn=None,
|
|
|
270 |
examples=[["data/images/CLEVR_default_000572.png", "data/images/CLEVR_semantic_000572.png"],
|
271 |
["data/images/CLEVR_default_003339.png", "data/images/CLEVR_semantic_003339.png"]],
|
272 |
inputs=[image_bef, image_aft],
|
273 |
+
# outputs=[image_display_with_grid_bef, image_display_with_grid_aft],
|
274 |
label="Example Images",
|
275 |
+
# fn=process_example,
|
276 |
examples_per_page=5
|
277 |
)
|
278 |
|
279 |
+
# image_bef.change(
|
280 |
+
# fn=display_image,
|
281 |
+
# inputs=[image_bef],
|
282 |
+
# outputs=[image_display_with_grid_bef, selected_cells_bef]
|
283 |
+
# )
|
284 |
+
|
285 |
+
# image_aft.change(
|
286 |
+
# fn=display_image,
|
287 |
+
# inputs=[image_aft],
|
288 |
+
# outputs=[image_display_with_grid_aft, selected_cells_aft]
|
289 |
+
# )
|
290 |
|
291 |
with gr.Column(scale=1):
|
292 |
# Output components
|
|
|
303 |
outputs=[prediction, selected_info_bef, selected_info_aft]
|
304 |
)
|
305 |
|
306 |
+
image_bef.change(
|
307 |
+
fn=None,
|
308 |
+
inputs=[image_bef],
|
309 |
+
outputs=[],
|
310 |
+
js="(image) => { initializeEditor(); importBackground(image); return []; }",
|
311 |
+
)
|
312 |
|
313 |
image_aft.change(
|
314 |
fn=None,
|