Example #1
0
def classify():
    question = request.forms.get("question")
    sessionid = request.forms.get("sessionid")
    answer = classifier.classify(question)
    face = faces[answer]
    logging.info("[%s] %s %s" % (sessionid, answer, question))
    return locals()
Example #2
0
def home():
    answer = classifier.classify(None)
    return dict(face=faces[answer], sessionid=generate_sessionid())