Spaces:
Runtime error
Runtime error
update model to ss-en-m2m100-combo
Browse files
app.py
CHANGED
|
@@ -3,14 +3,14 @@ from gradio.mix import Parallel, Series
|
|
| 3 |
|
| 4 |
from transformers import pipeline
|
| 5 |
|
| 6 |
-
translater = pipeline("translation", model="
|
| 7 |
|
| 8 |
|
| 9 |
def translate(inp, direction):
|
| 10 |
-
if direction == 'en
|
| 11 |
-
text = "
|
| 12 |
else:
|
| 13 |
-
text = "
|
| 14 |
|
| 15 |
res = translater(
|
| 16 |
text,
|
|
@@ -22,7 +22,7 @@ def translate(inp, direction):
|
|
| 22 |
description = """
|
| 23 |
<p>
|
| 24 |
<center>
|
| 25 |
-
Multi-domain Translation Between
|
| 26 |
</center>
|
| 27 |
</p>
|
| 28 |
"""
|
|
|
|
| 3 |
|
| 4 |
from transformers import pipeline
|
| 5 |
|
| 6 |
+
translater = pipeline("translation", model="dsfsi/ss-en-m2m100-combo")
|
| 7 |
|
| 8 |
|
| 9 |
def translate(inp, direction):
|
| 10 |
+
if direction == 'si->en':
|
| 11 |
+
text = "si: " + inp
|
| 12 |
else:
|
| 13 |
+
text = "en: " + inp
|
| 14 |
|
| 15 |
res = translater(
|
| 16 |
text,
|
|
|
|
| 22 |
description = """
|
| 23 |
<p>
|
| 24 |
<center>
|
| 25 |
+
Multi-domain Translation Between Siswati and English
|
| 26 |
</center>
|
| 27 |
</p>
|
| 28 |
"""
|