DVLe commited on
Commit
4b4bd55
·
verified ·
1 Parent(s): d387cf7

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
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()