Tonic commited on
Commit
74d6bf5
·
verified ·
1 Parent(s): c3409a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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("🤖metaintrospector/UniMath Examples"):
151
- for example in unimath_examples:
152
- gr.Textbox(value=example, label="🤖UniMath Example", lines=10)
 
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