Spaces:
Runtime error
Runtime error
Pablo Ojea Lopez
commited on
Commit
·
4070f95
1
Parent(s):
fc910dc
Prueba_04
Browse files- app.py +1 -1
- requirements.txt +3 -1
app.py
CHANGED
@@ -6,7 +6,7 @@ from transformers import pipeline
|
|
6 |
def translate(name):
|
7 |
|
8 |
trans = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es", tokenizer="Helsinki-NLP/opus-mt-en-es")
|
9 |
-
return trans(name)
|
10 |
|
11 |
# print (translate(sample_text))
|
12 |
|
|
|
6 |
def translate(name):
|
7 |
|
8 |
trans = pipeline("translation", model="Helsinki-NLP/opus-mt-en-es", tokenizer="Helsinki-NLP/opus-mt-en-es")
|
9 |
+
return trans(name)[0]["translation_text"]
|
10 |
|
11 |
# print (translate(sample_text))
|
12 |
|
requirements.txt
CHANGED
@@ -1 +1,3 @@
|
|
1 |
-
transformers
|
|
|
|
|
|
1 |
+
transformers
|
2 |
+
gradio
|
3 |
+
torch
|