Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -112,7 +112,12 @@ TcDebug (0) > NONE??? LtacNotationCall (no location),/mnt/data1/2024/01/05/UniMa
|
|
112 |
"""
|
113 |
# source : unimath/unimath/batch2/data_42/BATCH142042
|
114 |
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
116 |
|
117 |
model_name = "deepseek-ai/deepseek-math-7b-instruct"
|
118 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
@@ -159,15 +164,12 @@ def main():
|
|
159 |
additional_info = additional_info_prompt
|
160 |
return question, additional_info
|
161 |
|
162 |
-
with gr.
|
163 |
-
gr.
|
164 |
-
|
165 |
-
|
166 |
-
example_button.click(fn=set_example, inputs=[i], outputs=[question_field, additional_info_field])
|
167 |
|
168 |
-
|
169 |
-
|
170 |
-
demo.launch()
|
171 |
|
172 |
if __name__ == "__main__":
|
173 |
main()
|
|
|
112 |
"""
|
113 |
# source : unimath/unimath/batch2/data_42/BATCH142042
|
114 |
|
115 |
+
examples = [
|
116 |
+
(unimath1, additional_info_prompt),
|
117 |
+
(unimath2, additional_info_prompt),
|
118 |
+
(unimath3, additional_info_prompt),
|
119 |
+
(unimath4, additional_info_prompt),
|
120 |
+
]
|
121 |
|
122 |
model_name = "deepseek-ai/deepseek-math-7b-instruct"
|
123 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
|
164 |
additional_info = additional_info_prompt
|
165 |
return question, additional_info
|
166 |
|
167 |
+
with gr.Row():
|
168 |
+
with gr.Accordion("π€ UniMath Examples", open=False):
|
169 |
+
for i, example in enumerate(examples, start=1):
|
170 |
+
gr.Markdown(f"**Example {i}:**\n```{example[0]}```")
|
|
|
171 |
|
172 |
+
demo.launch(examples=examples)
|
|
|
|
|
173 |
|
174 |
if __name__ == "__main__":
|
175 |
main()
|