Download app.py from PythonMindset/portfolio-cheikh-niang: direct link, hf CLI and curl.
- Browser
- Download file 476 Bytes
-
https://huggingface.co/spaces/PythonMindset/portfolio-cheikh-niang/resolve/main/app.py
- Command line
-
hf download hf://spaces/PythonMindset/portfolio-cheikh-niang/app.py
-
curl -L -o app.py https://huggingface.co/spaces/PythonMindset/portfolio-cheikh-niang/resolve/main/app.py
476 Bytes
| from flask import Flask, send_from_directory | |
| import os | |
| app = Flask(__name__, | |
| static_folder='static', | |
| static_url_path='/static', | |
| template_folder='.') | |
| def index(): | |
| return send_from_directory('.', 'index.html') | |
| def test(): | |
| return send_from_directory('.', 'test.html') | |
| if __name__ == '__main__': | |
| port = int(os.environ.get('PORT', 7860)) | |
| app.run(host='0.0.0.0', port=port, debug=False) | |