소스 검색

修改冲突

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

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