Update app.py
Browse files
app.py
CHANGED
|
@@ -59,7 +59,7 @@ def chat():
|
|
| 59 |
response_json = response.json()
|
| 60 |
ai_response = response_json.get("response", "No 'response' key found in the JSON.")
|
| 61 |
ai_response = ai_response.encode('latin1').decode('utf-8', 'ignore')
|
| 62 |
-
return (ai_response)
|
| 63 |
else:
|
| 64 |
return jsonify({
|
| 65 |
"error": "Error from PythonAnywhere",
|
|
|
|
| 59 |
response_json = response.json()
|
| 60 |
ai_response = response_json.get("response", "No 'response' key found in the JSON.")
|
| 61 |
ai_response = ai_response.encode('latin1').decode('utf-8', 'ignore')
|
| 62 |
+
return jsonify({"response": ai_response})
|
| 63 |
else:
|
| 64 |
return jsonify({
|
| 65 |
"error": "Error from PythonAnywhere",
|