Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ from transformers import pipeline
|
|
| 8 |
pipe = pipeline("translation", model="t5-base")
|
| 9 |
|
| 10 |
def translate(text):
|
| 11 |
-
return
|
| 12 |
|
| 13 |
with gr.Blocks() as demo:
|
| 14 |
with gr.Row():
|
|
|
|
| 8 |
pipe = pipeline("translation", model="t5-base")
|
| 9 |
|
| 10 |
def translate(text):
|
| 11 |
+
return pipe(text)[0]["translation_text"]
|
| 12 |
|
| 13 |
with gr.Blocks() as demo:
|
| 14 |
with gr.Row():
|