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()
def home(): answer = classifier.classify(None) return dict(face=faces[answer], sessionid=generate_sessionid())