Exemplo n.º 1
0
def train_save():
    question = request.forms.get("question")
    sessionid = request.forms.get("sessionid")
    answer = request.forms.get("face")
    classifier.train((question, answer))
    logging.info("[%s] %s %s" % (sessionid, answer, question))
    return locals()
Exemplo n.º 2
0
def main():
    logging.basicConfig(level=logging.INFO, filename="transcript.log", format="%(message)s")
    faces.update(json.load(open("faces.json", "rb")))
    classifier.train(zip(len(faces) * [None], faces.keys()))
    run(port=8888)