Skip to content

Instantly share code, notes, and snippets.

@kirill-fedyanin
Last active January 12, 2024 13:29
Show Gist options
  • Save kirill-fedyanin/174fd090ea223f916bfd38a3d4832299 to your computer and use it in GitHub Desktop.
Save kirill-fedyanin/174fd090ea223f916bfd38a3d4832299 to your computer and use it in GitHub Desktop.
Adding new hugging face model from folder to site
# Essentially, hf model is just a git repo and you need to push data there.
# Create new model page on huggingface.co and put your credentials and model name in script below
# then you need your username and copy (or create) token from https://huggingface.co/settings/tokens
# Run this from folder with checkpoint
# Edit: lol, you could actually do just `huggingface-cli upload <username>/<model> .`
git init
git remote add origin https://<username>:<token>@huggingface.co/<username>/<model>
git fetch
git checkout main
git lfs install
git add .
git commit -m "Checkpoint"
git push origin main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment