Download Tool/Core.py from blitzkrieg0000/CablePoleSegmentation: direct link, hf CLI and curl.
- Browser
- Download file 431 Bytes
-
https://huggingface.co/spaces/blitzkrieg0000/CablePoleSegmentation/resolve/main/Tool/Core.py
- Command line
-
hf download hf://spaces/blitzkrieg0000/CablePoleSegmentation/Tool/Core.py
-
curl -L -o Core.py https://huggingface.co/spaces/blitzkrieg0000/CablePoleSegmentation/resolve/main/Tool/Core.py
431 Bytes
| import os | |
| from huggingface_hub import hf_hub_download, login, logout | |
| def DownloadHFModel(repo_id, file_name): | |
| login(os.environ["hf_read_model"]) | |
| hf_hub_download(repo_id=repo_id, filename=file_name, local_dir="./Weight") | |
| logout() | |
| if "__main__" == __name__: | |
| # Download Model | |
| REPO_ID = "blitzkrieg0000/yolov9_pole-cable-detection" | |
| MODEL_FILE = "yolov9c-cable-seg.pt" | |
| DownloadHFModel(REPO_ID, MODEL_FILE) |