Spaces:
Runtime error
Runtime error
banao-tech
commited on
Commit
β’
ce03a53
1
Parent(s):
c0871b9
Create download.py
Browse files- download.py +16 -0
download.py
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
from huggingface_hub import snapshot_download
|
3 |
+
|
4 |
+
# Set the repository name
|
5 |
+
repo_id = "microsoft/OmniParser"
|
6 |
+
|
7 |
+
# Set the local directory where you want to save the files
|
8 |
+
local_dir = "weights"
|
9 |
+
|
10 |
+
# Create the local directory if it doesn't exist
|
11 |
+
os.makedirs(local_dir, exist_ok=True)
|
12 |
+
|
13 |
+
# Download the entire repository
|
14 |
+
snapshot_download(repo_id, local_dir=local_dir, ignore_patterns=["*.md"])
|
15 |
+
|
16 |
+
print(f"All files and folders have been downloaded to {local_dir}")
|