input: def generate_web_app() -> str:
      """Generate a Python Flask code that creates a web application which takes user input
      and generates an HTML page displaying the input. The code should include the necessary
      route and template rendering.
      Example:
      for generate_web_app()
      should return a string containing the entire Flask application code.
      """
output:     
      from flask import Flask, render_template, request
  
      app = Flask(__name__)
  
      @app.route('/', methods=['GET', 'POST'])
      def index():
          if request.method == 'POST':
              user_input = request.form['user_input']
              return render_template('index.html', user_input=user_input)
          return render_template('index.html')
  
      return app.run(debug=True)
  