pooyanrg commited on
Commit
c0ad75f
·
1 Parent(s): 30ed4ed
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -288,20 +288,6 @@ with gr.Blocks() as demo:
288
  # outputs=[image_display_with_grid_aft, selected_cells_aft]
289
  # )
290
 
291
- image_bef.change(
292
- fn=None,
293
- inputs=[image_bef],
294
- outputs=[],
295
- js="(image) => { initializeEditor(); importBackground(image); return []; }",
296
- )
297
-
298
- image_aft.change(
299
- fn=None,
300
- inputs=[image_aft],
301
- outputs=[],
302
- js="(image) => { initializeEditor(); importBackground(image); return []; }",
303
- )
304
-
305
  with gr.Column(scale=1):
306
  # Output components
307
  prediction = gr.Textbox(label="Predicted caption")
@@ -317,6 +303,20 @@ with gr.Blocks() as demo:
317
  outputs=[prediction, selected_info_bef, selected_info_aft]
318
  )
319
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
 
321
 
322
  app.mount("/js", StaticFiles(directory="js"), name="js")
 
288
  # outputs=[image_display_with_grid_aft, selected_cells_aft]
289
  # )
290
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
291
  with gr.Column(scale=1):
292
  # Output components
293
  prediction = gr.Textbox(label="Predicted caption")
 
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,
315
+ inputs=[image_aft],
316
+ outputs=[],
317
+ js="(image) => { initializeEditor(); importBackground(image); return []; }",
318
+ )
319
+
320
 
321
 
322
  app.mount("/js", StaticFiles(directory="js"), name="js")