ソースを参照

添加新代码

gushoubang 10 ヶ月 前
コミット
863cb12fb7
2 ファイル変更4 行追加6 行削除
  1. 4 6
      app.py
  2. 0 0
      templates/index.html

+ 4 - 6
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__)
-# CORS(app)  # 允许所有域名访问
 
+# 后台接口
 @app.route("/")
 def home():
-    return "四维AI大模型!"
+    return render_template('index.html')
 
 
 @app.route('/msg', methods=['POST'])
@@ -26,9 +25,8 @@ def inputMsg():
 
     # 调用大模型解析
     #
-
     print(msg)
-    
+
     # 返回响应
     return jsonify({"message": "数据已接收", "received": data})
 

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