Download app.py from rastof9/minecraft: direct link, hf CLI and curl.
- Browser
- Download file 569 Bytes
-
https://huggingface.co/spaces/rastof9/minecraft/resolve/main/app.py
- Command line
-
hf download hf://spaces/rastof9/minecraft/app.py
-
curl -L -o app.py https://huggingface.co/spaces/rastof9/minecraft/resolve/main/app.py
569 Bytes
| from flask import Flask | |
| # Create a Flask web application | |
| app = Flask(__name__) | |
| # This is the main page. It will respond to Hugging Face's health checks. | |
| def health_check(): | |
| # You can customize this message | |
| return "This page keeps the Minecraft server's Hugging Face Space alive. The server is running in the background!" | |
| # This runs the web server. | |
| if __name__ == '__main__': | |
| # It listens on all network interfaces (0.0.0.0) and on port 7860, | |
| # which is the default port for Hugging Face Spaces. | |
| app.run(host='0.0.0.0', port=7860) |