from flask import Flask, request, redirect, url_for app = Flask(__name__) # In-memory storage for chat messages messages = [] # --- Home page --- @app.route('/', methods=['GET', 'POST']) def index(): global messages html = "
" html += "{i}:
" html += "" return html # --- Run the app --- if __name__ == '__main__': app.run(host='0.0.0.0', port=7860)