@home.route('/submit', methods=['GET'])
def submit():
    if (request.method == 'GET'):
        if request.args.get('submit_button'):
            text = request.args.get('input_text')
            mark = Markov(str(text), 1)
            output = mark.generate()
            return render_template('output.html', input=str(text), output=output)
        else:
            return redirect(url_for('index'))
    else:
        return redirect(url_for('index'))
@home.route('/submit', methods=['GET'])
def submit():
    if (request.method == 'GET'):
        if request.args.get('submit_button'):
            text = request.args.get('input_text')
            mark = Markov(str(text), 1)
            output = mark.generate()
            return render_template('output.html', input=str(text), output=output)
        else:
            return redirect(url_for('index'))
    else:
        return redirect(url_for('index'))