File size: 431 Bytes
aa98f24 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
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) |