Spaces:
Sleeping
Sleeping
Download scripts/check_space.py from MinhDS/ProfillyBot: direct link, hf CLI and curl.
- Browser
- Download file 897 Bytes
-
https://huggingface.co/spaces/MinhDS/ProfillyBot/resolve/d6ebd7d24b11ef9b2c59e95bb1aa111b9adafb6a/scripts/check_space.py
- Command line
-
hf download hf://spaces/MinhDS/ProfillyBot@d6ebd7d24b11ef9b2c59e95bb1aa111b9adafb6a/scripts/check_space.py
-
curl -L -o check_space.py https://huggingface.co/spaces/MinhDS/ProfillyBot/resolve/d6ebd7d24b11ef9b2c59e95bb1aa111b9adafb6a/scripts/check_space.py
897 Bytes
| """Check Space status / try to pull error details.""" | |
| import os | |
| import sys | |
| from huggingface_hub import HfApi | |
| def main() -> int: | |
| token = os.getenv("HF_TOKEN") or os.getenv("HUGGINGFACE_HUB_TOKEN") | |
| api = HfApi(token=token) | |
| info = api.space_info("MinhDS/ProfillyBot") | |
| rt = info.runtime | |
| print("stage:", rt.stage) | |
| print("hardware:", rt.hardware) | |
| print("requested:", rt.requested_hardware) | |
| print("raw:", rt.raw) | |
| # List top-level files | |
| files = sorted({s.rfilename.split("/")[0] for s in info.siblings}) | |
| print("top-level:", files) | |
| # Check for common issues: Dockerfile conflicting with Gradio SDK | |
| names = {s.rfilename for s in info.siblings} | |
| for f in ("Dockerfile", "Dockerfile.app", "app.py", "gradio_app.py", "requirements.txt"): | |
| print(f"has {f}:", f in names) | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |