网友小郑 8 months ago
parent
commit
575b7c5dd4
1 changed files with 2 additions and 0 deletions
  1. 2 0
      app.py

+ 2 - 0
app.py

@@ -1,5 +1,6 @@
 from flask import Flask,render_template, request, jsonify
 import ollama
+import json
 
 app = Flask(__name__)
 
@@ -33,6 +34,7 @@ def inputMsg():
     format="json"
     )
     json_res = res["response"]
+    json_res = json.loads(json_res)
     
 
     # 返回响应