import os from flask import Flask, render_template_string app = Flask(__name__) # HTML Template with embedded CSS for a clean look HTML_TEMPLATE = """ Docker on Hugging Face Spaces
Built with anycoder

Docker Space Running

Your containerized application is successfully running on Hugging Face Spaces. This page is being served by a Flask application running inside a Docker container.

● System Operational
""" @app.route("/") def home(): """Render the main landing page.""" return render_template_string(HTML_TEMPLATE) if __name__ == "__main__": # Hugging Face Spaces expects the app to run on port 7860 # We bind to 0.0.0.0 to accept connections from outside the container port = int(os.environ.get("PORT", 7860)) app.run(host="0.0.0.0", port=port)