Skip to content

Commit

Permalink
Revert token retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
LysandreJik committed Apr 12, 2022
1 parent 33666dd commit b0ca349
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.
"""

token, _ = self._validate_or_retrieve_token(token, function_name="model_info")
if token is None:
token = HfFolder.get_token()

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

0 comments on commit b0ca349

Please sign in to comment.