Spaces:
Sleeping
Sleeping
Download app.py from Smartlyqofficial/testapp: direct link, hf CLI and curl.
- Browser
- Download file 501 Bytes
-
https://huggingface.co/spaces/Smartlyqofficial/testapp/resolve/main/app.py
- Command line
-
hf download hf://spaces/Smartlyqofficial/testapp/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Smartlyqofficial/testapp/resolve/main/app.py
501 Bytes
| # app.py | |
| from flask import Flask | |
| # Initialize the Flask app | |
| app = Flask(__name__) | |
| # Define a route for the homepage | |
| def hello(): | |
| """Returns a simple greeting message.""" | |
| return "Hello from a Flask App on Hugging Face Spaces!" | |
| # This part is optional and is for running the app locally | |
| if __name__ == '__main__': | |
| # Running on 0.0.0.0 means it will be accessible from any IP address. | |
| # The default port is 5000. | |
| app.run(host='0.0.0.0', port=5000) |