Sakil's picture
Update app.py
92dba3b
raw
history blame
No virus
811 Bytes
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',theme = "dark-peach",examples=["what is your favourite movies?","What is your favourite color?"], description="The Ultimate Writing Companion:Say goodbye to writer's block and hello to seamless content creation! ")
iface.launch(inline=False)