Spaces:
Sleeping
Sleeping
File size: 1,064 Bytes
24d708d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | # Adding to Huggingface
1. Check Current status -> git remote -v
2. To remove an exisitng HF Repo -> git remote remove hf
3. To add Files to HF Repo -> git remote add hf https://huggingface.co/spaces/Username/SpaceName
4. Then commit using -> git push hf main OR git push hf main --force
#### Not permitting to add files to HF, generate new token with write permission
1. Go to https://huggingface.co/settings/tokens
2. Click **New token**
3. Name it something like: hf-cli
4. Set **Role = Write**
5. Copy the generated token.
6. logout and login in hf,
- huggingface-cli logout (deprecated) / hf auth logout
- huggingface-cli login (deprecated) / hf auth login
- paste key + enter / $env:HF_TOKEN = "token-no"
7. confirm identity
- huggingface-cli whoami (deprecated)/ hf auth whoami
8. try to push again
- git push hf main --force
git remote set-url origin https://<YOUR_USERNAME>:<YOUR_TOKEN>@huggingface.co/spaces/<YOUR_USERNAME>/<YOUR_REPO>.git
To check root folder in Repo -> git rev-parse --show-toplevel |