redfernstech commited on
Commit
38d31d1
·
verified ·
1 Parent(s): 12c72db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -186,7 +186,19 @@ async def receive_form_data(request: Request):
186
  async def chat(request: MessageRequest):
187
  message = request.message # Access the message from the request body
188
  language = request.language
189
- message=message+"give me answer in this languse"+language
 
 
 
 
 
 
 
 
 
 
 
 
190
  response = handle_query(message) # Process the message
191
  # Extract the language field
192
  # Print or log the language
 
186
  async def chat(request: MessageRequest):
187
  message = request.message # Access the message from the request body
188
  language = request.language
189
+ if language == "en-US":
190
+ language=" English"
191
+ elif language == "hi-IN":
192
+ language=" Hindi"
193
+ elif language == "es-ES":
194
+ language=" Spanish"
195
+ elif language == "fr-FR":
196
+ language=" French"
197
+ print("Language is French.")
198
+ elif language == "te-IN":
199
+ language=" Telugu"
200
+ print("Language is Telugu.")
201
+ message=message+"give me answer in this language only "+language
202
  response = handle_query(message) # Process the message
203
  # Extract the language field
204
  # Print or log the language