From b793920c584a95826259ebfcd29a88be077a2ca6 Mon Sep 17 00:00:00 2001 From: Simon Brandeis Date: Thu, 8 Sep 2022 16:06:30 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Missed=20some=20calls?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/huggingface_hub/_snapshot_download.py | 2 +- src/huggingface_hub/keras_mixin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/huggingface_hub/_snapshot_download.py b/src/huggingface_hub/_snapshot_download.py index b8978a17f3..c7e72580bb 100644 --- a/src/huggingface_hub/_snapshot_download.py +++ b/src/huggingface_hub/_snapshot_download.py @@ -167,7 +167,7 @@ def snapshot_download( # if we have internet connection we retrieve the correct folder name from the huggingface api _api = HfApi() repo_info = _api.repo_info( - repo_id=repo_id, repo_type=repo_type, revision=revision, token=token + repo_id=repo_id, repo_type=repo_type, revision=revision, use_auth_token=token ) filtered_repo_files = list( filter_repo_objects( diff --git a/src/huggingface_hub/keras_mixin.py b/src/huggingface_hub/keras_mixin.py index b834497895..472e4ac843 100644 --- a/src/huggingface_hub/keras_mixin.py +++ b/src/huggingface_hub/keras_mixin.py @@ -439,7 +439,7 @@ def push_to_hub_keras( # Delete previous log files from Hub operations += [ CommitOperationDelete(path_in_repo=file) - for file in api.list_repo_files(repo_id=repo_id, token=token) + for file in api.list_repo_files(repo_id=repo_id, use_auth_token=token) if file.startswith("logs/") ]