amplegest / dashboard /runtime_env.py
Viney's picture
fix: commit missing dashboard.runtime_env module used by app.py
d5257f7
Raw
History Blame Contribute Delete
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"))