Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ from transformers import pipeline
|
|
| 2 |
import gradio as grad
|
| 3 |
|
| 4 |
mdl_name="Helsinki-NLP/opus-mt-en-de"
|
| 5 |
-
opus_translator("translation", model=mdl_name)
|
| 6 |
|
| 7 |
def translate(text):
|
| 8 |
response = opus_translator(text)
|
|
|
|
| 2 |
import gradio as grad
|
| 3 |
|
| 4 |
mdl_name="Helsinki-NLP/opus-mt-en-de"
|
| 5 |
+
opus_translator=pipeline("translation", model=mdl_name)
|
| 6 |
|
| 7 |
def translate(text):
|
| 8 |
response = opus_translator(text)
|