Spaces:
Runtime error
Runtime error
update another func
Browse files
app.py
CHANGED
|
@@ -770,7 +770,7 @@ with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
|
|
| 770 |
gr.HTML("Problem example", elem_classes="probelm-example-title-content")
|
| 771 |
|
| 772 |
with gr.Blocks(elem_classes="action-container"):
|
| 773 |
-
gr.Button(
|
| 774 |
"",
|
| 775 |
elem_classes="probelm-example-another",
|
| 776 |
icon="./static/images/reset.png",
|
|
@@ -823,5 +823,14 @@ with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
|
|
| 823 |
],
|
| 824 |
)
|
| 825 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 826 |
if __name__ == "__main__":
|
| 827 |
demo.queue(default_concurrency_limit=5).launch()
|
|
|
|
| 770 |
gr.HTML("Problem example", elem_classes="probelm-example-title-content")
|
| 771 |
|
| 772 |
with gr.Blocks(elem_classes="action-container"):
|
| 773 |
+
another_btn = gr.Button(
|
| 774 |
"",
|
| 775 |
elem_classes="probelm-example-another",
|
| 776 |
icon="./static/images/reset.png",
|
|
|
|
| 823 |
],
|
| 824 |
)
|
| 825 |
|
| 826 |
+
another_btn.click(
|
| 827 |
+
fn=update_example_problem,
|
| 828 |
+
inputs=[],
|
| 829 |
+
outputs=[
|
| 830 |
+
problem_example,
|
| 831 |
+
problem_example_text_hidden,
|
| 832 |
+
],
|
| 833 |
+
)
|
| 834 |
+
|
| 835 |
if __name__ == "__main__":
|
| 836 |
demo.queue(default_concurrency_limit=5).launch()
|