|
@@ -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})
|
|
|
|