Sadjad Alikhani commited on
Commit
17885e5
·
verified ·
1 Parent(s): 7f53290

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -38,9 +38,9 @@ with gr.Blocks() as demo:
38
  raw_img = gr.Image(label="Raw Channels", type="pil", interactive=False)
39
  embeddings_img = gr.Image(label="Embeddings", type="pil", interactive=False)
40
 
41
- # Update images instantaneously without clicking submit
42
- percentage_dropdown.change(fn=display_images, inputs=[percentage_dropdown, complexity_radio], outputs=[raw_img, embeddings_img], live=True)
43
- complexity_radio.change(fn=display_images, inputs=[percentage_dropdown, complexity_radio], outputs=[raw_img, embeddings_img], live=True)
44
 
45
  # Launch the app
46
  if __name__ == "__main__":
 
38
  raw_img = gr.Image(label="Raw Channels", type="pil", interactive=False)
39
  embeddings_img = gr.Image(label="Embeddings", type="pil", interactive=False)
40
 
41
+ # Trigger image updates when inputs change
42
+ percentage_dropdown.change(fn=display_images, inputs=[percentage_dropdown, complexity_radio], outputs=[raw_img, embeddings_img])
43
+ complexity_radio.change(fn=display_images, inputs=[percentage_dropdown, complexity_radio], outputs=[raw_img, embeddings_img])
44
 
45
  # Launch the app
46
  if __name__ == "__main__":