Spaces:
Sleeping
Sleeping
Download dashboard/runtime_env.py from Viney/readthrough: direct link, hf CLI and curl.
- Browser
- Download file 407 Bytes
-
https://huggingface.co/spaces/Viney/readthrough/resolve/main/dashboard/runtime_env.py
- Command line
-
hf download hf://spaces/Viney/readthrough/dashboard/runtime_env.py
-
curl -L -o runtime_env.py https://huggingface.co/spaces/Viney/readthrough/resolve/main/dashboard/runtime_env.py
407 Bytes
| import os | |
| def is_hosted_space() -> bool: | |
| """Return whether the app runs on a hosted Hugging Face Space. | |
| User-facing remediation depends on the runtime: a local user can run the | |
| ingestion command, while a hosted-app user must ask the maintainer to | |
| update and redeploy the committed data snapshot. | |
| """ | |
| return os.environ.get("SYSTEM") == "spaces" or bool(os.environ.get("SPACE_ID")) | |