File size: 441 Bytes
243e29d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from transformers import pipeline
import gradio as gr

def parph(name= "paraphrase: This is something which I cannt understand at all."):
  text2text = pipeline("text2text-generation")
  #model_name = 'tuner007/pegasus_paraphrase'
  text2text = pipeline('text2text-generation', model = "Vamsi/T5_Paraphrase_Paws")
  text2text()
  return "Hello " + name + "!!"

 
iface = gr.Interface(fn=parph, inputs="text", outputs="text")
iface.launch()