def post(): sentence = flask.request.form['text'] trans = Translator(sentence) trans.translate() if trans.res == None: return flask.render_template('index.html') trans.finalize() print(trans.res) return flask.render_template('index.html', sentence=sentence, gloss=trans.gloss, res=trans.res, phono=trans.phonology)