瀏覽代碼

修改冲突

网友小郑 10 月之前
父節點
當前提交
5b02ba6c2d
共有 2 個文件被更改,包括 4 次插入9 次删除
  1. 4 9
      app.py
  2. 0 0
      templates/index.html

+ 4 - 9
app.py

@@ -1,12 +1,11 @@
-from flask import Flask, request, jsonify
-# from flask_cors import CORS
+from flask import Flask,render_template, request, jsonify
 
 
 app = Flask(__name__)
 app = Flask(__name__)
-# CORS(app)  # 允许所有域名访问
 
 
+# 后台接口
 @app.route("/")
 @app.route("/")
 def home():
 def home():
-    return "四维AI大模型!"
+    return render_template('index.html')
 
 
 
 
 @app.route('/msg', methods=['POST'])
 @app.route('/msg', methods=['POST'])
@@ -24,12 +23,8 @@ def inputMsg():
     msg=data['msg']
     msg=data['msg']
     # 调用大模型解析
     # 调用大模型解析
     # 这里调用大模型,并返回解析结果
     # 这里调用大模型,并返回解析结果
-
-
-
-
     print(msg)
     print(msg)
-    
+
     # 返回响应
     # 返回响应
     return jsonify({"message": "数据已接收", "received": data})
     return jsonify({"message": "数据已接收", "received": data})
 
 

+ 0 - 0
static/voice.html → templates/index.html