From ce56d544475769e4cbbc872adb694aae6599a2df Mon Sep 17 00:00:00 2001 From: Charlie Lange Date: Wed, 28 Feb 2024 20:47:24 +0100 Subject: [PATCH] Create download_pretrained_models.py --- download_pretrained_models.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 download_pretrained_models.py diff --git a/download_pretrained_models.py b/download_pretrained_models.py new file mode 100644 index 0000000..5b83d99 --- /dev/null +++ b/download_pretrained_models.py @@ -0,0 +1,14 @@ +from huggingface_hub import hf_hub_download + + +# Path of the directory where the checkpoints will be downloaded in your local machine +local_directory = os.path.join(os.getcwd(), 'pretrained_models') + + +# snapshot_download(...) function will download the folder from the HuggingFace Repository. This takes while. +# please refer to the huggingface repo to get instructions for downloading only a subselection of the available checkpoints +repo_id = "climateset/causalpaca_models" +repo_type = "model" +snapshot_download(repo_id=repo_id, repo_type=repo_type, local_dir=local_directory, local_dir_use_symlinks=False) + +