lime-j commited on
Commit
7465809
·
verified ·
1 Parent(s): 752e4db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -150,10 +150,10 @@ with gr.Blocks() as block_demo:
150
  # f'### Submit your choice for **{new_property}**'
151
  ]
152
 
153
- l_butt.click(fn=update_interface, inputs=[method1_state, image_state, method1_state, method2_state, property_state, ip_state], outputs=[l_butt, r_butt, both_good, both_bad, refresh_butt], js="window.location.reload()")
154
- r_butt.click(fn=update_interface, inputs=[method2_state, image_state, method1_state, method2_state, property_state, ip_state], outputs=[l_butt, r_butt, both_good, both_bad, refresh_butt],js="window.location.reload()")
155
- both_good.click(fn=update_interface, inputs=[gr.State('both_good'), image_state, method1_state, method2_state, property_state, ip_state], outputs=[l_butt, r_butt, both_good, both_bad, refresh_butt],js="window.location.reload()")
156
- both_bad.click(fn=update_interface, inputs=[gr.State('both_bad'), image_state, method1_state, method2_state, property_state, ip_state], outputs=[l_butt, r_butt, both_good, both_bad, refresh_butt], js="window.location.reload()")
157
 
158
 
159
  # refresh_butt.click(None, js="window.location.reload()")
 
150
  # f'### Submit your choice for **{new_property}**'
151
  ]
152
 
153
+ l_butt.click(fn=update_interface, inputs=[method1_state, image_state, method1_state, method2_state, property_state, ip_state], outputs=[l_butt, r_butt, both_good, both_bad, refresh_butt], js="sleep(1);window.location.reload()")
154
+ r_butt.click(fn=update_interface, inputs=[method2_state, image_state, method1_state, method2_state, property_state, ip_state], outputs=[l_butt, r_butt, both_good, both_bad, refresh_butt],js="sleep(1);window.location.reload()")
155
+ both_good.click(fn=update_interface, inputs=[gr.State('both_good'), image_state, method1_state, method2_state, property_state, ip_state], outputs=[l_butt, r_butt, both_good, both_bad, refresh_butt],js="sleep(1);window.location.reload()")
156
+ both_bad.click(fn=update_interface, inputs=[gr.State('both_bad'), image_state, method1_state, method2_state, property_state, ip_state], outputs=[l_butt, r_butt, both_good, both_bad, refresh_butt], js="sleep(1);window.location.reload()")
157
 
158
 
159
  # refresh_butt.click(None, js="window.location.reload()")