File size: 423 Bytes
8898b62
 
 
 
 
 
 
 
 
 
 
ec13d32
 
8898b62
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/yolov7_fault-detection"
    MODEL_FILE = "yolov7_ariza.onnx"
    DownloadHFModel(REPO_ID, MODEL_FILE)