Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,9 +9,9 @@ def translate(text, direction):
|
|
| 9 |
# inputs = my_tkn(text, return_tensors="pt")
|
| 10 |
# trans_output = mdl.generate(**inputs)
|
| 11 |
if direction == "MSA → Egyptian":
|
| 12 |
-
prompt = text + " <
|
| 13 |
else:
|
| 14 |
-
prompt = text + " <
|
| 15 |
response = pipe(prompt)[0]['translation_text']
|
| 16 |
|
| 17 |
#response = opus_translator(text)
|
|
|
|
| 9 |
# inputs = my_tkn(text, return_tensors="pt")
|
| 10 |
# trans_output = mdl.generate(**inputs)
|
| 11 |
if direction == "MSA → Egyptian":
|
| 12 |
+
prompt = text + " <arz>"
|
| 13 |
else:
|
| 14 |
+
prompt = text + " <ar>"
|
| 15 |
response = pipe(prompt)[0]['translation_text']
|
| 16 |
|
| 17 |
#response = opus_translator(text)
|