huggingface / huggingface_hub

The official Python client for the Huggingface Hub.
https://huggingface.co/docs/huggingface_hub
Apache License 2.0
1.82k stars 470 forks source link

Fix Repository if whoami call doesn't return an email #2320

Closed Wauplin closed 3 weeks ago

Wauplin commented 3 weeks ago

Better to do whoami().get("email") since this field is not guaranteed to be returned. It depends on token's permission which can be restricted in case of finegrained token or OAuth token.

First reported on HF Forum.

HuggingFaceDocBuilderDev commented 3 weeks ago

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.