from flask import Flask
from flask import request
import jieba
import json
app = Flask(__name__)
@app.route('/')
def index():
kw = request.args.get('kw')
result = jieba.lcut(kw)
print(result)
response = {
'code': 200,
'message': '请求成功',
'data': result
}
return json.dumps(response).decode("utf-8")
暂无评论