Skip to content

Commit

Permalink
Replace token retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
LysandreJik committed Apr 12, 2022
1 parent f1e86c4 commit 33666dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/huggingface_hub/hf_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,8 @@ def model_info(
Returns:
[`huggingface_hub.hf_api.ModelInfo`]: The model repository information.
"""
if token is None:
token = HfFolder.get_token()

token, _ = self._validate_or_retrieve_token(token, function_name="model_info")

path = (
f"{self.endpoint}/api/models/{repo_id}"
Expand Down

0 comments on commit 33666dd

Please sign in to comment.