Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -114,18 +114,18 @@ with gr.Blocks() as block_demo:
|
|
| 114 |
gr.Button(interactive=False),
|
| 115 |
gr.Button(interactive=False),
|
| 116 |
gr.Button(interactive=False),
|
| 117 |
-
|
| 118 |
-
|
| 119 |
gr.Button(visible=True, interactive=True),
|
| 120 |
# gr.Image(new_image1),
|
| 121 |
# gr.Image(new_image2),
|
| 122 |
# f'### Submit your choice for **{new_property}**'
|
| 123 |
]
|
| 124 |
|
| 125 |
-
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])
|
| 126 |
-
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])
|
| 127 |
-
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])
|
| 128 |
-
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])
|
| 129 |
|
| 130 |
|
| 131 |
refresh_butt.click(None, js="window.location.reload()")
|
|
|
|
| 114 |
gr.Button(interactive=False),
|
| 115 |
gr.Button(interactive=False),
|
| 116 |
gr.Button(interactive=False),
|
| 117 |
+
gr.Markdown(f'Left image: {method_dict[method1]}'),
|
| 118 |
+
gr.Markdown(f'Right image: {method_dict[method2]}'),
|
| 119 |
gr.Button(visible=True, interactive=True),
|
| 120 |
# gr.Image(new_image1),
|
| 121 |
# gr.Image(new_image2),
|
| 122 |
# f'### Submit your choice for **{new_property}**'
|
| 123 |
]
|
| 124 |
|
| 125 |
+
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, l_note, r_note, refresh_butt])
|
| 126 |
+
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, l_note, r_note, refresh_butt])
|
| 127 |
+
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, l_note, r_note, refresh_butt])
|
| 128 |
+
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, l_note, r_note, refresh_butt])
|
| 129 |
|
| 130 |
|
| 131 |
refresh_butt.click(None, js="window.location.reload()")
|