Gradio LFS problem - Solved

To https://huggingface.co/spaces/eBoof/minimal
! [remote rejected] main → main (pre-receive hook declined)
error: failed to push some refs to ‘https://huggingface.co/spaces/eBoof/minimal

I get the above error when I try to push model.pkl from my local machine. I get asked for my username and password 3 times and then it appears to push the file and then after some time I get the above message to say it was rejected.

Any help would be appreciated. Cheers Rob

I managed to solve this problem.
The .gitattributes file would not update as long as the model.pkl file was being tracked. I moved the file out of the directory and then I completely removed the file from Git history by using the filter-branch command. Added model.pkl to .gitignore and then force-pushed to the repository so it updated .gitattributes. commented out model.pkl in .gitignore. Moved model.pkl back added committed and pushed and it worked like a dream.

you can upload the model via huggingfaces files interface, next to spaces.