Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import pipeline
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
pip = pipeline(model = "DVLe/finetuned_t5_math")
|
| 5 |
+
def launch(input):
|
| 6 |
+
txt = "let think step by step and give me the answer of this question: " + input
|
| 7 |
+
out = pip(txt)
|
| 8 |
+
return out[0]['generated_text']
|
| 9 |
+
iface = gr.Interface(launch, inputs = "text", outputs= "text")
|
| 10 |
+
iface.launch()
|