fcakyon commited on
Commit
280e111
·
verified ·
1 Parent(s): 8080af0

reset points when input image is changed or removed

Browse files
Files changed (1) hide show
  1. app_gradio.py +1 -0
app_gradio.py CHANGED
@@ -366,6 +366,7 @@ with gr.Blocks(css=css, title='Fast Segment Anything') as demo:
366
  def clear_text():
367
  return None, None, None
368
 
 
369
  clear_btn_e.click(clear, outputs=[cond_img_e, segm_img_e])
370
  clear_btn_p.click(clear, outputs=[cond_img_p, segm_img_p])
371
  clear_btn_t.click(clear_text, outputs=[cond_img_p, segm_img_p, text_box])
 
366
  def clear_text():
367
  return None, None, None
368
 
369
+ cond_img_p.input(clear, outputs=[cond_img_e, segm_img_e])
370
  clear_btn_e.click(clear, outputs=[cond_img_e, segm_img_e])
371
  clear_btn_p.click(clear, outputs=[cond_img_p, segm_img_p])
372
  clear_btn_t.click(clear_text, outputs=[cond_img_p, segm_img_p, text_box])