Spaces:
Running
Running
Disable Yes/No buttons until files uploaded
Browse files
app.py
CHANGED
|
@@ -276,13 +276,13 @@ def show_modal():
|
|
| 276 |
def hide_modal():
|
| 277 |
return gr.update(visible=False)
|
| 278 |
|
| 279 |
-
def
|
| 280 |
return (
|
| 281 |
gr.update(interactive=False),
|
| 282 |
gr.update(interactive=False),
|
| 283 |
)
|
| 284 |
|
| 285 |
-
def
|
| 286 |
return (
|
| 287 |
gr.update(interactive=True),
|
| 288 |
gr.update(interactive=True),
|
|
@@ -551,10 +551,10 @@ def gradio_app():
|
|
| 551 |
)
|
| 552 |
|
| 553 |
modal_submit_yes.click(
|
| 554 |
-
fn=
|
| 555 |
outputs=[
|
| 556 |
-
|
| 557 |
-
|
| 558 |
]
|
| 559 |
).then(
|
| 560 |
fn=submit_results,
|
|
@@ -573,10 +573,10 @@ def gradio_app():
|
|
| 573 |
tournament_results_dropdown,
|
| 574 |
],
|
| 575 |
).then(
|
| 576 |
-
fn=
|
| 577 |
outputs=[
|
| 578 |
-
|
| 579 |
-
|
| 580 |
]
|
| 581 |
)
|
| 582 |
|
|
|
|
| 276 |
def hide_modal():
|
| 277 |
return gr.update(visible=False)
|
| 278 |
|
| 279 |
+
def disable_submit_buttons():
|
| 280 |
return (
|
| 281 |
gr.update(interactive=False),
|
| 282 |
gr.update(interactive=False),
|
| 283 |
)
|
| 284 |
|
| 285 |
+
def enable_submit_buttons():
|
| 286 |
return (
|
| 287 |
gr.update(interactive=True),
|
| 288 |
gr.update(interactive=True),
|
|
|
|
| 551 |
)
|
| 552 |
|
| 553 |
modal_submit_yes.click(
|
| 554 |
+
fn=disable_submit_buttons,
|
| 555 |
outputs=[
|
| 556 |
+
modal_submit_yes,
|
| 557 |
+
modal_submit_no,
|
| 558 |
]
|
| 559 |
).then(
|
| 560 |
fn=submit_results,
|
|
|
|
| 573 |
tournament_results_dropdown,
|
| 574 |
],
|
| 575 |
).then(
|
| 576 |
+
fn=enable_submit_buttons,
|
| 577 |
outputs=[
|
| 578 |
+
modal_submit_yes,
|
| 579 |
+
modal_submit_no,
|
| 580 |
]
|
| 581 |
)
|
| 582 |
|