DVLe commited on
Commit
ae1540a
·
verified ·
1 Parent(s): 073dc85

Create app.py

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