CORVO-AI commited on
Commit
a723420
·
verified ·
1 Parent(s): 86f00c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -58,7 +58,8 @@ def chat():
58
  if response.status_code == 200:
59
  response_json = response.json()
60
  ai_response = response_json.get("response", "No 'response' key found in the JSON.")
61
- return jsonify({"response": ai_response})
 
62
  else:
63
  return jsonify({
64
  "error": "Error from PythonAnywhere",
 
58
  if response.status_code == 200:
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",