marlenezw's picture
adding changes to thirdparty library and adding upload and download funtcionality
eb66c12
raw
history blame
No virus
483 Bytes
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