input: Write a function to create a web application using Flask that takes user input and generates an HTML page displaying the input. The function should initialize the Flask application, define a route to handle both GET and POST requests, and render HTML templates to display the user input. The function should return the Flask app object.
  from flask import Flask, render_template, request
  
  def create_flask_app():
      app = Flask(__name__)
  
      @app.route('/', methods=['GET', 'POST'])
      def home():
          if request.method == 'POST':
              input_text = request.form.get('input_text')
              return render_template('result.html', input_text=input_text)
          return render_template('index.html')
  
      return app
  assert create_flask_app().test_client().post('/', data={'input_text': 'Hello World'}).status_code==200
  assert create_flask_app().test_client().get('/').status_code==200
  assert 'Hello World' in create_flask_app().test_client().post('/', data={'input_text': 'Hello World'}).data.decode('utf-8')
output: 
  def create_flask_app():
      app = Flask(__name__)
  
      @app.route('/', methods=['GET', 'POST'])
      def home():
          if request.method == 'POST':
              input_text = request.form.get('input_text')
              return render_template('result.html', input_text=input_text)
          return render_template('index.html')
  
      return app
  