Spaces:
Sleeping
Sleeping
Download app.py from MBG0903/Hands-On-Agentic-Project: direct link, hf CLI and curl.
- Browser
- Download file 605 Bytes
-
https://huggingface.co/spaces/MBG0903/Hands-On-Agentic-Project/resolve/main/app.py
- Command line
-
hf download hf://spaces/MBG0903/Hands-On-Agentic-Project/app.py
-
curl -L -o app.py https://huggingface.co/spaces/MBG0903/Hands-On-Agentic-Project/resolve/main/app.py
605 Bytes
| import os | |
| import sys | |
| from streamlit.web import cli as stcli | |
| # Hugging Face Spaces expects apps to listen on port 7860. | |
| os.environ.setdefault("STREAMLIT_SERVER_PORT", "7860") | |
| os.environ.setdefault("STREAMLIT_SERVER_ADDRESS", "0.0.0.0") | |
| # Your actual Streamlit app is inside src/streamlit_app.py | |
| APP_FILE = "src/streamlit_app.py" | |
| if __name__ == "__main__": | |
| sys.argv = [ | |
| "streamlit", | |
| "run", | |
| APP_FILE, | |
| "--server.port=7860", | |
| "--server.address=0.0.0.0", | |
| "--server.headless=true", | |
| "--browser.gatherUsageStats=false", | |
| ] | |
| sys.exit(stcli.main()) |