Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,8 @@ You can also use ๐ฎDeepSeekMath๐ by cloning this space. Simply click here:
|
|
10 |
Join us : ๐TeamTonic๐ is always making cool demos! Join our active builder's ๐ ๏ธcommunity ๐ป [![Join us on Discord](https://img.shields.io/discord/1109943800132010065?label=Discord&logo=discord&style=flat-square)](https://discord.gg/GWpVpekp) On ๐คHuggingface: [TeamTonic](https://huggingface.co/TeamTonic) & [MultiTransformer](https://huggingface.co/MultiTransformer) Math with [introspector](https://huggingface.co/introspector) On ๐Github: [Tonic-AI](https://github.com/tonic-ai) & contribute to๐ [SciTonic](https://github.com/Tonic-AI/scitonic)๐คBig thanks to Yuvi Sharma and all the folks at huggingface for the community grant ๐ค
|
11 |
"""
|
12 |
|
|
|
|
|
13 |
unimath1 = """Goal:
|
14 |
|
15 |
X : UU
|
@@ -147,9 +149,10 @@ def main():
|
|
147 |
submit_button = gr.Button("๐Solve")
|
148 |
question = gr.Code(language='python', value='what is the integral of x^2 from 0 to 2?', label="๐คEnter your math problem")
|
149 |
additional_info = gr.Text(value='Please reason step by step, and put your final answer within \\boxed{{}}', label="๐ชOptional train-of-thought")
|
150 |
-
with gr.Accordion("๐ค
|
151 |
-
|
152 |
-
|
|
|
153 |
|
154 |
submit_button.click(fn=solve_math_problem, inputs=[question, additional_info, max_tokens], outputs=[full_answer_output, final_answer_output])
|
155 |
|
|
|
10 |
Join us : ๐TeamTonic๐ is always making cool demos! Join our active builder's ๐ ๏ธcommunity ๐ป [![Join us on Discord](https://img.shields.io/discord/1109943800132010065?label=Discord&logo=discord&style=flat-square)](https://discord.gg/GWpVpekp) On ๐คHuggingface: [TeamTonic](https://huggingface.co/TeamTonic) & [MultiTransformer](https://huggingface.co/MultiTransformer) Math with [introspector](https://huggingface.co/introspector) On ๐Github: [Tonic-AI](https://github.com/tonic-ai) & contribute to๐ [SciTonic](https://github.com/Tonic-AI/scitonic)๐คBig thanks to Yuvi Sharma and all the folks at huggingface for the community grant ๐ค
|
11 |
"""
|
12 |
|
13 |
+
additional_info_prompt = "Explain the above using mathematics, print entire answer in latex format:"
|
14 |
+
|
15 |
unimath1 = """Goal:
|
16 |
|
17 |
X : UU
|
|
|
149 |
submit_button = gr.Button("๐Solve")
|
150 |
question = gr.Code(language='python', value='what is the integral of x^2 from 0 to 2?', label="๐คEnter your math problem")
|
151 |
additional_info = gr.Text(value='Please reason step by step, and put your final answer within \\boxed{{}}', label="๐ชOptional train-of-thought")
|
152 |
+
with gr.Accordion("๐ค UniMath Examples", open=False):
|
153 |
+
gr.Markdown("Click a ๐ค UniMath example to load it into the solver.")
|
154 |
+
for i, example in enumerate([unimath1, unimath2, unimath3, unimath4], start=1):
|
155 |
+
gr.Button(f"Example {i}", elem_id=f"example{i}").click(fn=set_example, inputs=example, outputs=[question_field, additional_info_field])
|
156 |
|
157 |
submit_button.click(fn=solve_math_problem, inputs=[question, additional_info, max_tokens], outputs=[full_answer_output, final_answer_output])
|
158 |
|