1234567891011121314151617181920212223242526272829 |
- """
- @author: luojunhui
- """
- from quart import Blueprint, jsonify, request
- from applications.functions import ParamProcess
- video_score_blueprint = Blueprint('light_gbm_score', __name__)
- @video_score_blueprint.route('/healthcheck')
- 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:
- """
- p = ParamProcess()
- data = await request.get_json()
- processed_data = await p.process(data)
- return jsonify(processed_data)
|