Spaces:
Build error
Build error
edit result
Browse filesedit results to show only text
app.py
CHANGED
|
@@ -4,8 +4,8 @@ from transformers import pipeline
|
|
| 4 |
translation = pipeline("translation", "Shularp/krirk-finetuned-Helsinki-NLP_opus-mt-ar-en")
|
| 5 |
|
| 6 |
def translate(text):
|
| 7 |
-
|
| 8 |
-
return result
|
| 9 |
|
| 10 |
|
| 11 |
|
|
|
|
| 4 |
translation = pipeline("translation", "Shularp/krirk-finetuned-Helsinki-NLP_opus-mt-ar-en")
|
| 5 |
|
| 6 |
def translate(text):
|
| 7 |
+
results = translation(text)
|
| 8 |
+
return [result['translation_text'] for result in results]
|
| 9 |
|
| 10 |
|
| 11 |
|