Spaces:
Runtime error
Runtime error
No examples omitted
Browse files
app.py
CHANGED
|
@@ -748,15 +748,12 @@ def get_random_problem():
|
|
| 748 |
|
| 749 |
def update_example_problem():
|
| 750 |
problem_example_text = get_random_problem()
|
| 751 |
-
|
| 752 |
-
problem_example_text[:100] if len(problem_example_text) > 100 else problem_example_text
|
| 753 |
-
)
|
| 754 |
-
return problem_example_text_display, problem_example_text
|
| 755 |
|
| 756 |
|
| 757 |
def clear():
|
| 758 |
-
|
| 759 |
-
return "", 0.1, "",
|
| 760 |
|
| 761 |
|
| 762 |
with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
|
|
@@ -764,7 +761,7 @@ with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
|
|
| 764 |
btn_list = []
|
| 765 |
problem_input_ele_list = []
|
| 766 |
|
| 767 |
-
|
| 768 |
|
| 769 |
with gr.Row(elem_classes="title"):
|
| 770 |
gr.HTML("Math Olympiad Solver", elem_classes="title-content")
|
|
@@ -787,7 +784,7 @@ with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
|
|
| 787 |
copy_btn = gr.Button("Copy", elem_classes="probelm-example-copy")
|
| 788 |
|
| 789 |
problem_example = gr.HTML(
|
| 790 |
-
|
| 791 |
elem_classes="probelm-example-content",
|
| 792 |
)
|
| 793 |
|
|
|
|
| 748 |
|
| 749 |
def update_example_problem():
|
| 750 |
problem_example_text = get_random_problem()
|
| 751 |
+
return problem_example_text, problem_example_text
|
|
|
|
|
|
|
|
|
|
| 752 |
|
| 753 |
|
| 754 |
def clear():
|
| 755 |
+
problem_example_text, _ = get_random_problem()
|
| 756 |
+
return "", 0.1, "", problem_example_text, problem_example_text
|
| 757 |
|
| 758 |
|
| 759 |
with gr.Blocks(css=css, title="Math Olympiad Solver") as demo:
|
|
|
|
| 761 |
btn_list = []
|
| 762 |
problem_input_ele_list = []
|
| 763 |
|
| 764 |
+
problem_example_text = get_random_problem()
|
| 765 |
|
| 766 |
with gr.Row(elem_classes="title"):
|
| 767 |
gr.HTML("Math Olympiad Solver", elem_classes="title-content")
|
|
|
|
| 784 |
copy_btn = gr.Button("Copy", elem_classes="probelm-example-copy")
|
| 785 |
|
| 786 |
problem_example = gr.HTML(
|
| 787 |
+
problem_example_text,
|
| 788 |
elem_classes="probelm-example-content",
|
| 789 |
)
|
| 790 |
|