Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -295,7 +295,7 @@ def respond(
|
|
295 |
if val[0]:
|
296 |
# Only translate longer messages
|
297 |
if len(val[0].split()) > 2:
|
298 |
-
trans_user_msg,
|
299 |
messages.append({"role": "user", "content": trans_user_msg})
|
300 |
else:
|
301 |
messages.append({"role": "user", "content": val[0]})
|
|
|
295 |
if val[0]:
|
296 |
# Only translate longer messages
|
297 |
if len(val[0].split()) > 2:
|
298 |
+
trans_user_msg, original_lang, was_transliterated = translate_text(val[0])
|
299 |
messages.append({"role": "user", "content": trans_user_msg})
|
300 |
else:
|
301 |
messages.append({"role": "user", "content": val[0]})
|