#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...") |