Spaces:
Sleeping
Sleeping
blitzkrieg0000
commited on
Commit
•
1563971
1
Parent(s):
8d7d889
Upload 2 files
Browse files- Tool/Core.py +14 -0
- Tool/__init__.py +0 -0
Tool/Core.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
from huggingface_hub import hf_hub_download, login, logout
|
3 |
+
|
4 |
+
|
5 |
+
def DownloadHFModel(repo_id, file_name):
|
6 |
+
login(os.environ["hf_read_model"])
|
7 |
+
hf_hub_download(repo_id=repo_id, filename=file_name, local_dir="./Weight")
|
8 |
+
logout()
|
9 |
+
|
10 |
+
if "__main__" == __name__:
|
11 |
+
# Download Model
|
12 |
+
REPO_ID = "blitzkrieg0000/yolov7_bird-nest-detection"
|
13 |
+
MODEL_FILE = "yolov7_kus.onnx"
|
14 |
+
DownloadHFModel(REPO_ID, MODEL_FILE)
|
Tool/__init__.py
ADDED
File without changes
|