Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,12 +27,12 @@
|
|
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
|
31 |
import gradio as grad
|
32 |
|
33 |
model_name = "MiVaCod/mbart-neutralization"
|
34 |
text2text_tkn= MBart50Tokenizer.from_pretrained(model_name)
|
35 |
-
mdl =
|
36 |
|
37 |
def text2text_paraphrase(sentence1):
|
38 |
inp1 = "rte sentence1: "+sentence1
|
|
|
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 MBartForConditionalGeneration, MBart50Tokenizer
|
31 |
import gradio as grad
|
32 |
|
33 |
model_name = "MiVaCod/mbart-neutralization"
|
34 |
text2text_tkn= MBart50Tokenizer.from_pretrained(model_name)
|
35 |
+
mdl = MBartForConditionalGeneration.from_pretrained(model_name)
|
36 |
|
37 |
def text2text_paraphrase(sentence1):
|
38 |
inp1 = "rte sentence1: "+sentence1
|