()
| 5 | predict_blueprint = Blueprint('predict', __name__) |
| 6 | |
| 7 | def extract_input(): |
| 8 | client = request.args.get('client') |
| 9 | if not request.args.get('json') is None: |
| 10 | jStr = request.args.get('json') |
| 11 | else: |
| 12 | jStr = request.form.get('json') |
| 13 | j = json.loads(jStr) |
| 14 | input = { |
| 15 | "client" : client, |
| 16 | "json" : j |
| 17 | } |
| 18 | return input |
| 19 | |
| 20 | @predict_blueprint.route('/predict',methods=['GET','POST']) |
| 21 | def do_predict(): |