Update app.py
Browse files
app.py
CHANGED
@@ -79,5 +79,15 @@ neutralizer = pipeline('text2text-generation', model='islasher/mbart-spanishToQu
|
|
79 |
# trad = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
80 |
# return trad
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
# Creamos la interfaz y la lanzamos.
|
83 |
gr.Interface(fn=neutralizer, inputs="text", outputs="text").launch(share=False)
|
|
|
79 |
# trad = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
80 |
# return trad
|
81 |
|
82 |
+
|
83 |
+
|
84 |
+
def predict(frase):
|
85 |
+
# inputs = tokenizer(frase, return_tensors="pt")
|
86 |
+
# outputs = model(**inputs)
|
87 |
+
# trad = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
88 |
+
return neutralizer['generated_text']
|
89 |
+
|
90 |
+
# Creamos la interfaz y la lanzamos.
|
91 |
+
gr.Interface(fn=neutralizer, inputs="text", outputs="text").launch(share=False)
|
92 |
# Creamos la interfaz y la lanzamos.
|
93 |
gr.Interface(fn=neutralizer, inputs="text", outputs="text").launch(share=False)
|