Spaces:
Runtime error
Runtime error
Fixed the issue where examples would not update
Browse files
app.py
CHANGED
@@ -795,10 +795,10 @@ with gr.Blocks(css=css) as demo:
|
|
795 |
problem_example_1 = gr.Markdown(value=problem_1_display, elem_classes="problem-text")
|
796 |
copy_btn_1 = gr.Button("Copy", elem_classes="copy-button")
|
797 |
with gr.Row(elem_classes="problem-examples-container"):
|
798 |
-
|
799 |
value="Problem example 2", latex_delimiters=latex_delimiters, elem_classes="problem-container-label"
|
800 |
)
|
801 |
-
gr.Markdown(value=problem_2_display, elem_classes="problem-text")
|
802 |
copy_btn_2 = gr.Button("Copy", elem_classes="copy-button")
|
803 |
|
804 |
with gr.Row():
|
@@ -819,10 +819,8 @@ with gr.Blocks(css=css) as demo:
|
|
819 |
copy_btn_1.click(fn=copy_problem_to_input, inputs=[problem_1_full_hidden], outputs=[inp])
|
820 |
copy_btn_2.click(fn=copy_problem_to_input, inputs=[problem_2_full_hidden], outputs=[inp])
|
821 |
|
822 |
-
btn_clear.click(js=js)
|
823 |
-
|
824 |
btn_clear.click(
|
825 |
-
fn=
|
826 |
inputs=[],
|
827 |
outputs=[
|
828 |
inp,
|
@@ -833,6 +831,7 @@ with gr.Blocks(css=css) as demo:
|
|
833 |
problem_1_full_hidden,
|
834 |
problem_2_full_hidden,
|
835 |
],
|
|
|
836 |
)
|
837 |
|
838 |
demo.load(
|
@@ -846,6 +845,5 @@ with gr.Blocks(css=css) as demo:
|
|
846 |
],
|
847 |
)
|
848 |
|
849 |
-
|
850 |
if __name__ == "__main__":
|
851 |
demo.queue(default_concurrency_limit=5).launch()
|
|
|
795 |
problem_example_1 = gr.Markdown(value=problem_1_display, elem_classes="problem-text")
|
796 |
copy_btn_1 = gr.Button("Copy", elem_classes="copy-button")
|
797 |
with gr.Row(elem_classes="problem-examples-container"):
|
798 |
+
gr.Markdown(
|
799 |
value="Problem example 2", latex_delimiters=latex_delimiters, elem_classes="problem-container-label"
|
800 |
)
|
801 |
+
problem_example_2 = gr.Markdown(value=problem_2_display, elem_classes="problem-text")
|
802 |
copy_btn_2 = gr.Button("Copy", elem_classes="copy-button")
|
803 |
|
804 |
with gr.Row():
|
|
|
819 |
copy_btn_1.click(fn=copy_problem_to_input, inputs=[problem_1_full_hidden], outputs=[inp])
|
820 |
copy_btn_2.click(fn=copy_problem_to_input, inputs=[problem_2_full_hidden], outputs=[inp])
|
821 |
|
|
|
|
|
822 |
btn_clear.click(
|
823 |
+
fn=clear_inputs,
|
824 |
inputs=[],
|
825 |
outputs=[
|
826 |
inp,
|
|
|
831 |
problem_1_full_hidden,
|
832 |
problem_2_full_hidden,
|
833 |
],
|
834 |
+
js=js,
|
835 |
)
|
836 |
|
837 |
demo.load(
|
|
|
845 |
],
|
846 |
)
|
847 |
|
|
|
848 |
if __name__ == "__main__":
|
849 |
demo.queue(default_concurrency_limit=5).launch()
|