SeyedAli commited on
Commit
f27a4ff
β€’
1 Parent(s): fc8f9e3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,10 +5,10 @@ from transformers import T5ForConditionalGeneration,AutoTokenizer,pipeline
5
  tokenizer = AutoTokenizer.from_pretrained('SeyedAli/Persian-Text-paraphraser-mT5-V1',model_max_length=100, add_special_tokens = True)
6
  model = T5ForConditionalGeneration.from_pretrained('SeyedAli/Persian-Text-paraphraser-mT5-V1')
7
 
8
- def NER(text):
9
  pipline = pipeline(task='text2text-generation', model=model, tokenizer=tokenizer)
10
  output=pipline(text)
11
  return output
12
 
13
- iface = gr.Interface(fn=NER, inputs="text", outputs="text")
14
  iface.launch(share=False)
 
5
  tokenizer = AutoTokenizer.from_pretrained('SeyedAli/Persian-Text-paraphraser-mT5-V1',model_max_length=100, add_special_tokens = True)
6
  model = T5ForConditionalGeneration.from_pretrained('SeyedAli/Persian-Text-paraphraser-mT5-V1')
7
 
8
+ def Paraphrase(text):
9
  pipline = pipeline(task='text2text-generation', model=model, tokenizer=tokenizer)
10
  output=pipline(text)
11
  return output
12
 
13
+ iface = gr.Interface(fn=Paraphrase, inputs="text", outputs="text")
14
  iface.launch(share=False)