Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -115,11 +115,14 @@ def respond(
|
|
115 |
|
116 |
response += token
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
123 |
|
124 |
|
125 |
"""
|
|
|
115 |
|
116 |
response += token
|
117 |
|
118 |
+
if(len(token)==0 and message_language!='en'):
|
119 |
+
translated_response = translator.translate(response, src='en', dest=message_language)
|
120 |
+
if(translated_response and translated_response.text):
|
121 |
+
yield translated_response.text
|
122 |
+
else:
|
123 |
+
yield response
|
124 |
+
else:
|
125 |
+
yield response
|
126 |
|
127 |
|
128 |
"""
|