diff --git a/src/huggingface_hub/hf_api.py b/src/huggingface_hub/hf_api.py index e6ed7088da..e0758c0665 100644 --- a/src/huggingface_hub/hf_api.py +++ b/src/huggingface_hub/hf_api.py @@ -1846,11 +1846,10 @@ def update_repo_visibility( else: namespace = organization - path_prefix = f"{self.endpoint}/api/" - if repo_type in REPO_TYPES_URL_PREFIXES: - path_prefix += REPO_TYPES_URL_PREFIXES[repo_type] + if repo_type is None: + repo_type = REPO_TYPE_MODEL # default repo type - path = f"{path_prefix}{namespace}/{name}/settings" + path = f"{self.endpoint}/api/{repo_type}s/{namespace}/{name}/settings" json = {"private": private} diff --git a/src/huggingface_hub/lfs.py b/src/huggingface_hub/lfs.py index c15583088f..9d61c9e830 100644 --- a/src/huggingface_hub/lfs.py +++ b/src/huggingface_hub/lfs.py @@ -63,7 +63,7 @@ def install_lfs_in_userspace(): @dataclass class UploadInfo: """ - Dataclass holding required information to determine wether a blob + Dataclass holding required information to determine whether a blob should be uploaded to the hub using the LFS protocol or the regular protocol Args: