I used wget to retrieve data from my space on colab. It worked as long as it was public, but I made it private so it now no longer works. How do I insert a passcode, or PAT as I had to do with github?
edit: Let me add I have tried this but I get invalid user/password (even though the UAT is 100% valid) " https://USER:*firstname.lastname@example.org/datasets/GeneralAwareness/Various/blob/main/file.zip"
You need to add the authorization header to
wget --header="Authorization: Bearer <HF_TOKEN>" hf/file/download/url
<HF_TOKEN> with your HF token)
I don’t understand. Instead of the https://USER:xxxxxx/xxxx/xx.zip above, I replace that with --header=“Authorization: Bearer <HF_TOKEN>” then “https://huggingface.co/datasets/GeneralAwareness/Various/blob/main/file.zip” where the HF_TOKEN is one that I created?
hi @GeneralAwareness here is the command, replace
HF_TOKEN with a read token
wget --header="Authorization: Bearer HF_TOKEN" https://huggingface.co/datasets/GeneralAwareness/Various/resolve/main/file.zip
Good, I did understand afterall.
Thank you everyone.
I have a follow-up question. I am trying to load some of the ShapeNetCore zip files (I have gotten access) in colab, but using Hugging Face login fails. Another person suggested the above approach. Is there a way to access my token after I login and pass it into the header? I have used .env files in VSC, but not sure of best practices in colab.