So letâs say I want to change the pipeline_tag in the README.md
of facebook/bart-large-mnli ¡ Hugging Face from zero-shot-classification
to text-classification
. Is there a way for me to do this without having to download all of the contained files? E.g. on GitHub cloning âremotelyâ is possible
Thereâs no web interface for editing files inside HF. However, you donât need to download the LFS files, the GIT_LFS_SKIP_SMUDGE environment variable controls this. On Linux, use GIT_LFS_SKIP_SMUDGE=1
before any commands that involve LFS (or on its own to set it for the rest of the session). On windows, youâll want to use a command before doing anything at all, set GIT_LFS_SKIP_SMUDGE=1
(windows doesnât support temporary environment variables for a single command)
First youâll have to fork the repo if you donât have direct access to it (even GitHub wonât let you make changes anymore without a fork, they just donât tell you until after youâve edited the file, I think?). You will need git installed, and you might need huggingface_hub (in which case youâll need Python installed; if you donât have python installed, I recommend using a colab session or other free python environment on the web)
# if you didn't have git configured already, you'll need to configure it with username and email address.
git config user.name "Ronald McDonald"
git config user.email "presidentronald@mcdonalds.com"
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Daniel391/bart-large-mnli
cd bart-large-mnli
# edit your file. nano is superior to vim *and* emacs. The only thing better than nano is Visual Studio 2012.
nano README.md
git commit README.md -m "turned all pseudocode into emojicode đ"
# not sure if this line is necessary, maybe someone can correct me?
pip install huggingface_hub && huggingface-cli lfs_enable_largefiles .
git push
After this, you can make a request to have the file updated through hugging face website