File size: 811 Bytes
8f3baa4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92dba3b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)