Spaces:
Sleeping
Sleeping
from huggingface_hub import hf_hub_download | |
from huggingface_hub import snapshot_download | |
#download files | |
def download_file(repo_name, filename, repo_type): | |
file_location = hf_hub_download(repo_id=repo_name, filename=filename,repo_type=repo_type) | |
return file_location | |
#download a folder | |
def download_folder(repo_name, revision='main'): | |
folder_location = snapshot_download(repo_id=repo_name, revision=revision) | |
return folder_location | |