Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -185,8 +185,10 @@ async def receive_form_data(request: Request):
|
|
| 185 |
@app.post("/chat/")
|
| 186 |
async def chat(request: MessageRequest):
|
| 187 |
message = request.message # Access the message from the request body
|
|
|
|
|
|
|
| 188 |
response = handle_query(message) # Process the message
|
| 189 |
-
|
| 190 |
# Print or log the language
|
| 191 |
print(f"Selected Language: {language}")
|
| 192 |
#language =request.language
|
|
|
|
| 185 |
@app.post("/chat/")
|
| 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
|
| 193 |
print(f"Selected Language: {language}")
|
| 194 |
#language =request.language
|