1from flask import Flask, request, render_template
2
3app = Flask(__name__)
4
5@app.route('/')
6def my_form():
7 return render_template('my-form.html')
8
9@app.route('/', methods=['POST'])
10def my_form_post():
11 text = request.form['text']
12 processed_text = text.upper()
13 return processed_text