Sakil's picture
Update app.py
118898a
from parrot import Parrot
import torch
import gradio as gr
parrot = Parrot(model_tag="prithivida/parrot_paraphraser_on_T5", use_gpu=False)
def get_parapharse(phrase):
"Function to generate pharaphrase"
phrases=[phrase]
for phrase in phrases:
print("Input_phrase: ", phrase)
para_phrases = parrot.augment(input_phrase=phrase)
total_list_phrae=[]
for para_phrase in para_phrases:
total_list_phrae.append(para_phrase[0])
return total_list_phrae
iface = gr.Interface(get_parapharse,inputs="text",outputs="text",title='Paraphrase Prodigy',examples=["which are your favourite movies?","Which are your favourite colors?"], description="The Ultimate Writing Companion:Say goodbye to writer's block and hello to seamless content creation!")
iface.launch(inline=False)