Upload scripts/hf_downloader.py with huggingface_hub
Browse files- scripts/hf_downloader.py +2 -1
scripts/hf_downloader.py
CHANGED
@@ -82,8 +82,9 @@ def main():
|
|
82 |
local_path = os.environ.get("LOCAL_PATH", "./")
|
83 |
|
84 |
if target_folder is None:
|
|
|
85 |
|
86 |
-
api = HfApi(endpoint="https://huggingface.co", token=
|
87 |
rep = HFRepository(repository, api, repo_namespace, "dataset", local_path=local_path)
|
88 |
rep.download_folder(target_folder)
|
89 |
|
|
|
82 |
local_path = os.environ.get("LOCAL_PATH", "./")
|
83 |
|
84 |
if target_folder is None:
|
85 |
+
raise Exception("No REMOTE_PATH set")
|
86 |
|
87 |
+
api = HfApi(endpoint="https://huggingface.co", token=token)
|
88 |
rep = HFRepository(repository, api, repo_namespace, "dataset", local_path=local_path)
|
89 |
rep.download_folder(target_folder)
|
90 |
|