Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -27,11 +27,11 @@
|
|
| 27 |
# # Launch the interface
|
| 28 |
# gr.Interface(fn=predict, inputs=gr.inputs.Textbox, outputs=gr.outputs.Textbox).launch(share=False)
|
| 29 |
|
| 30 |
-
from transformers import T5ForConditionalGeneration,
|
| 31 |
import gradio as grad
|
| 32 |
|
| 33 |
model_name = "MiVaCod/mbart-neutralization"
|
| 34 |
-
text2text_tkn=
|
| 35 |
mdl = T5ForConditionalGeneration.from_pretrained(model_name)
|
| 36 |
|
| 37 |
def text2text_paraphrase(sentence1,sentence2):
|
|
|
|
| 27 |
# # Launch the interface
|
| 28 |
# gr.Interface(fn=predict, inputs=gr.inputs.Textbox, outputs=gr.outputs.Textbox).launch(share=False)
|
| 29 |
|
| 30 |
+
from transformers import T5ForConditionalGeneration, MBart50Tokenizer
|
| 31 |
import gradio as grad
|
| 32 |
|
| 33 |
model_name = "MiVaCod/mbart-neutralization"
|
| 34 |
+
text2text_tkn= MBart50Tokenizer.from_pretrained(model_name)
|
| 35 |
mdl = T5ForConditionalGeneration.from_pretrained(model_name)
|
| 36 |
|
| 37 |
def text2text_paraphrase(sentence1,sentence2):
|