예제 #1
0
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'))
예제 #2
0
def getmessage():
    result = getClassify(request.args.get('id'), request.args.get('input'))
    resp = jsonify(result)
    resp.status_code = 200
    return resp