redfernstech commited on
Commit
a09e5f2
·
verified ·
1 Parent(s): 025180c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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: