Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -113,10 +113,10 @@ TcDebug (0) > NONE??? LtacNotationCall (no location),/mnt/data1/2024/01/05/UniMa
|
|
113 |
# source : unimath/unimath/batch2/data_42/BATCH142042
|
114 |
|
115 |
examples = [
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
]
|
121 |
|
122 |
model_name = "deepseek-ai/deepseek-math-7b-instruct"
|
@@ -147,29 +147,26 @@ def solve_math_problem(question, additional_info, max_tokens):
|
|
147 |
|
148 |
|
149 |
def main():
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
gr.Markdown(f"**Example {i}:**\n```{example[0]}```")
|
171 |
-
|
172 |
-
demo.launch(examples=examples)
|
173 |
|
174 |
if __name__ == "__main__":
|
175 |
main()
|
|
|
113 |
# source : unimath/unimath/batch2/data_42/BATCH142042
|
114 |
|
115 |
examples = [
|
116 |
+
[unimath1, additional_info_prompt, 1200],
|
117 |
+
[unimath2, additional_info_prompt, 1200],
|
118 |
+
[unimath3, additional_info_prompt, 1200],
|
119 |
+
[unimath4, additional_info_prompt, 1200]
|
120 |
]
|
121 |
|
122 |
model_name = "deepseek-ai/deepseek-math-7b-instruct"
|
|
|
147 |
|
148 |
|
149 |
def main():
|
150 |
+
iface = gr.Interface(
|
151 |
+
title="👋🏻Welcome to🌟Tonic's 🔮DeepSeekMath📉",
|
152 |
+
description="""You can build with this endpoint using🔮DeepSeekMath📉 available here : [deepseek-ai/deepseek-math-7b-instruct](https://huggingface.co/deepseek-ai/deepseek-math-7b-instruct). We're using 🤖[introspector/unimath](https://huggingface.co/datasets/introspector/unimath) for cool examples, check it out below ! The demo is still a work in progress and we're looking forward to build downstream tasks that showcase outstanding mathematical reasoning. Have any ideas ? join us below !
|
153 |
+
You can also use 🔮DeepSeekMath📉 by cloning this space. Simply click here: <a style="display:inline-block" href="https://huggingface.co/spaces/Tonic/Math?duplicate=true"><img src="https://img.shields.io/badge/-Duplicate%20Space-blue?labelColor=white&style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAP5JREFUOE+lk7FqAkEURY+ltunEgFXS2sZGIbXfEPdLlnxJyDdYB62sbbUKpLbVNhyYFzbrrA74YJlh9r079973psed0cvUD4A+4HoCjsA85X0Dfn/RBLBgBDxnQPfAEJgBY+A9gALA4tcbamSzS4xq4FOQAJgCDwV2CPKV8tZAJcAjMMkUe1vX+U+SMhfAJEHasQIWmXNN3abzDwHUrgcRGmYcgKe0bxrblHEB4E/pndMazNpSZGcsZdBlYJcEL9Afo75molJyM2FxmPgmgPqlWNLGfwZGG6UiyEvLzHYDmoPkDDiNm9JR9uboiONcBXrpY1qmgs21x1QwyZcpvxt9NS09PlsPAAAAAElFTkSuQmCC&logoWidth=14" alt="Duplicate Space"></a></h3>
|
154 |
+
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 🤗""",
|
155 |
+
fn=solve_math_problem,
|
156 |
+
outputs=[
|
157 |
+
gr.Code(label="🔮TonicsMathAssistant📉", interactive=False),
|
158 |
+
gr.Textbox(label="Final Answer")
|
159 |
+
]
|
160 |
+
inputs=[
|
161 |
+
gr.Textbox(label="🤔Enter your math problem", lines=7),
|
162 |
+
gr.Textbox(default=additional_info_prompt, label="🪜Optional train-of-thought"),
|
163 |
+
gr.Slider(minimum=150, maximum=1200, default=250, label="🪙Max Tokens")
|
164 |
+
],
|
165 |
+
|
166 |
+
examples=examples
|
167 |
+
)
|
168 |
+
|
169 |
+
iface.launch()
|
|
|
|
|
|
|
170 |
|
171 |
if __name__ == "__main__":
|
172 |
main()
|