|
@@ -0,0 +1,28 @@
|
|
|
+"""
|
|
|
+@author: luojunhui
|
|
|
+"""
|
|
|
+from quart import Blueprint, jsonify, request
|
|
|
+from applications.functions import process_data
|
|
|
+
|
|
|
+
|
|
|
+video_score_blueprint = Blueprint('light_gbm_score', __name__)
|
|
|
+
|
|
|
+
|
|
|
+@video_score_blueprint.route('/hello')
|
|
|
+async def hello():
|
|
|
+ """
|
|
|
+ Hello World Test
|
|
|
+ :return:
|
|
|
+ """
|
|
|
+ return jsonify({'message': 'Hello, World!'})
|
|
|
+
|
|
|
+
|
|
|
+@video_score_blueprint.route('/lightgbm_score', methods=['POST'])
|
|
|
+async def post_data():
|
|
|
+ """
|
|
|
+ 请求接口代码
|
|
|
+ :return:
|
|
|
+ """
|
|
|
+ data = await request.get_json()
|
|
|
+ processed_data = await process_data(data)
|
|
|
+ return jsonify(processed_data)
|