File size: 1,073 Bytes
9202f00
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#According to the docs, Repository is deprecated in favor of the http-based alternatives implemented in HfApi. 
#Given its large adoption in legacy code, the complete removal of Repository will only happen in release v1.0. 
#For more details, please read this explanation page.

from huggingface_hub import Repository

# Specify your local directory where you want the repository cloned.
local_dir = "C:/Repos/PSHomeCacheDepot"

# Specify the URL for cloning.
repo_url = "https://huggingface.co/datasets/pebxcvi/PSHomeCacheDepot"

# This will clone the repository to local_dir.
repo = Repository(local_dir, clone_from=repo_url)

print(f"Repository cloned to: {local_dir}")

# snapshot_download doesn't seem to work. keeps erroring out.

#from huggingface_hub import snapshot_download

#local_path = snapshot_download(
#    repo_id="pebxcvi/PSHomeCacheDepot",
#    repo_type="dataset",
#    revision="main",
#    local_dir=r"C:\Repos\PSHomeCacheDepot",
#    #etag_timeout=60,
#    #max_workers=
#)

#print("Files downloaded to:", local_path)

input("Press Enter to exit...")