Spaces:
Sleeping
Sleeping
Adding to Huggingface
- Check Current status -> git remote -v
- To remove an exisitng HF Repo -> git remote remove hf
- To add Files to HF Repo -> git remote add hf https://huggingface.co/spaces/Username/SpaceName
- 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
- Go to https://huggingface.co/settings/tokens
- Click New token
- Name it something like: hf-cli
- Set Role = Write
- Copy the generated token.
- 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"
- confirm identity - huggingface-cli whoami (deprecated)/ hf auth whoami
- try to push again - git push hf main --force
git remote set-url origin https://:@huggingface.co/spaces//.git
To check root folder in Repo -> git rev-parse --show-toplevel
To fetch remote branches -> git fetch hf To check remote branches -> git branch -r Switch to main branch -> git checkout main