Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -158,6 +158,9 @@ async def chat(request: MessageRequest):
|
|
158 |
message = request.message # Access the message from the request body
|
159 |
language = request.language
|
160 |
language_code = request.language.split('-')[0]
|
|
|
|
|
|
|
161 |
response = handle_query(message) # Process the message
|
162 |
response1 = response
|
163 |
try:
|
|
|
158 |
message = request.message # Access the message from the request body
|
159 |
language = request.language
|
160 |
language_code = request.language.split('-')[0]
|
161 |
+
translator1 = GoogleTranslator(source='auto', target='en')
|
162 |
+
# Translation
|
163 |
+
message = translator1.translate(message)
|
164 |
response = handle_query(message) # Process the message
|
165 |
response1 = response
|
166 |
try:
|