input: Write a function to create a Python Flask web application that takes user input and generates an HTML page displaying the input. The function should define the main application logic and the necessary routes. It should also include the required HTML templates for rendering the input.
  assert create_flask_app() is not None
  assert create_flask_app().run(debug=True) is None
output: 
  def create_flask_app():
      from flask import Flask, request, render_template
  
      app = Flask(__name__)
  
      @app.route('/', methods=['GET', 'POST'])
      def index():
          if request.method == 'POST':
              user_input = request.form['user_input']
              return render_template('display.html', user_input=user_input)
          return render_template('index.html')
  
      return app
  