Add a `token` attribute to `HfApi`
See original GitHub issueMentioned multiple times, last time in https://github.com/huggingface/huggingface_hub/issues/1094#issuecomment-1263349065.
The idea is to be able to set a token
in the constructor of HfApi
client object. This would avoid to pass the token to each method 1 by 1. This proposition is different than using notebook_login
or huggingface-cli login
as the token should not be persisted on disk.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Hugging Face Hub API
Using the HfApi class directly enables you to configure the client. In particular, a token can be passed to be authenticated in all...
Read more >huggingface_hub/hf_api.py at main · huggingface ... - GitHub
This attribute is present when `files_metadata` argument ... Otherwise, the token must be retrieved from cache or env variable. token=(token or self.token ......
Read more >skorch.hf — skorch 0.12.1dev documentation - Read the Docs
Optional post-processor, mostly used to add special tokens for BERT etc. max_length : int (default=256). Maximum number of tokens used per sequence.
Read more >Adding custom attributes to spaCy objects - YouTube
In this video, I'm going to show you how to add custom attributes to spaCy Token, Span and Doc objects.✨ Check out the...
Read more >huggingface-hub Changelog - pyup.io
from huggingface_hub import HfApi. Token will be sent in every request but not stored on machine api = HfApi(token="hf_***") * Add token attribute...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think @LysandreJik is referring to this one: https://github.com/huggingface/huggingface_hub/issues/796, which is almost a duplicate issue.
Addressed in https://github.com/huggingface/huggingface_hub/pull/1116.