123456789101112131415161718192021222324252627282930 |
- """
- @author: luojunhui
- """
- from quart import Blueprint, jsonify, request
- from applications.process import ProcessParams
- my_blueprint = Blueprint('kimi', __name__)
- @my_blueprint.route('/healthcheck')
- async def hello():
- """
- Hello World Test
- :return:
- """
- return jsonify({'message': 'Hello, World!'})
- @my_blueprint.route('/title_to_video', methods=['POST'])
- async def post_data():
- """
- 请求接口代码
- :return:
- """
- p = ProcessParams()
- data = await request.get_json()
- processed_data = p.process(data)
- return jsonify(processed_data)
|