Authentication
Configure authentication for Hugging Face Hub and W&B.Hugging Face Token
Environment Variable
In Python
Getting a Token
- Go to huggingface.co/settings/tokens
- Click “New token”
- Select “Write” access for push to hub
- Copy the token
W&B Token
Environment Variable
In Python
Getting a Token
- Go to wandb.ai/authorize
- Copy your API key
Push to Hub
To push models to Hugging Face Hub:Private Models
Access private models with your token:Private Datasets
Access private datasets:Secure Token Handling
Using .env Files
Never Commit Tokens
Add to.gitignore: