makanaan commited on
Commit
243e29d
·
1 Parent(s): d702ad9

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import gradio as gr
3
+
4
+ def parph(name= "paraphrase: This is something which I cannt understand at all."):
5
+ text2text = pipeline("text2text-generation")
6
+ #model_name = 'tuner007/pegasus_paraphrase'
7
+ text2text = pipeline('text2text-generation', model = "Vamsi/T5_Paraphrase_Paws")
8
+ text2text()
9
+ return "Hello " + name + "!!"
10
+
11
+
12
+ iface = gr.Interface(fn=parph, inputs="text", outputs="text")
13
+ iface.launch()
14
+