def newsubmit(): form = SubmitForm() if form.validate_on_submit(): submitted = Data() submitted.c4cid = random.random() form.populate_obj(submitted) result = getClassify(submitted.c4cid, submitted.message) print(result) return redirect(url_for('index'))
def getmessage(): result = getClassify(request.args.get('id'), request.args.get('input')) resp = jsonify(result) resp.status_code = 200 return resp