Spaces:
Runtime error
Runtime error
Download index.py from vishnu-coder/twitter-sentiment-app: direct link, hf CLI and curl.
- Browser
- Download file 251 Bytes
-
https://huggingface.co/spaces/vishnu-coder/twitter-sentiment-app/resolve/main/index.py
- Command line
-
hf download hf://spaces/vishnu-coder/twitter-sentiment-app/index.py
-
curl -L -o index.py https://huggingface.co/spaces/vishnu-coder/twitter-sentiment-app/resolve/main/index.py
251 Bytes
| import os | |
| import subprocess | |
| # Run the Streamlit app when deployed on Vercel | |
| if __name__ == "__main__": | |
| port = os.environ.get("PORT", "8000") | |
| subprocess.run(["streamlit", "run", "app.py", "--server.port", port, "--server.address", "0.0.0.0"]) | |