Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ translator_client = Client("Chatboong/Gemini_Translator")
|
|
| 22 |
|
| 23 |
|
| 24 |
def translate_zomi(text: str):
|
| 25 |
-
msg = f"Translate Zomi to English: '{text}'"
|
| 26 |
|
| 27 |
stream = translator_client.predict(
|
| 28 |
message=msg,
|
|
@@ -36,7 +36,7 @@ def translate_zomi(text: str):
|
|
| 36 |
output += str(chunk)
|
| 37 |
|
| 38 |
# Remove prefix
|
| 39 |
-
prefix = "Translate Zomi to English:"
|
| 40 |
if output.startswith(prefix):
|
| 41 |
output = output[len(prefix):].strip()
|
| 42 |
# Remove surrounding quotes
|
|
|
|
| 22 |
|
| 23 |
|
| 24 |
def translate_zomi(text: str):
|
| 25 |
+
msg = f"Translate Zomi to English, if it is English translate it to Zomi: '{text}'"
|
| 26 |
|
| 27 |
stream = translator_client.predict(
|
| 28 |
message=msg,
|
|
|
|
| 36 |
output += str(chunk)
|
| 37 |
|
| 38 |
# Remove prefix
|
| 39 |
+
prefix = "Translate Zomi to English, if it is English translate it to Zomi: "
|
| 40 |
if output.startswith(prefix):
|
| 41 |
output = output[len(prefix):].strip()
|
| 42 |
# Remove surrounding quotes
|