Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,13 +4,13 @@ from transformers import pipeline
|
|
4 |
|
5 |
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-en-pt")
|
6 |
|
7 |
-
def
|
8 |
return pipe(text)[0]["translation_text"]
|
9 |
|
10 |
titulo = "tradutor Inglês para Brazileirez"
|
11 |
|
12 |
igr = gr.Interface(
|
13 |
-
fn=
|
14 |
inputs=[gr.Textbox(label="text", lines=3)],
|
15 |
outputs='text',
|
16 |
title=titulo,
|
|
|
4 |
|
5 |
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-en-pt")
|
6 |
|
7 |
+
def predict(text):
|
8 |
return pipe(text)[0]["translation_text"]
|
9 |
|
10 |
titulo = "tradutor Inglês para Brazileirez"
|
11 |
|
12 |
igr = gr.Interface(
|
13 |
+
fn=predict,
|
14 |
inputs=[gr.Textbox(label="text", lines=3)],
|
15 |
outputs='text',
|
16 |
title=titulo,
|