Can't access private model in private space?
I’m trying to test a private model of mine in a private space I’ve set up for /learning/testing. I have an authorization token set up as a secret and am fetching with os.environ.get() (I know the token works because i can use it in Colab and i know this bit of code fetches the token correctly because i tested it by displaying in a text box temporarily.)But i just can’t  figure out a way of loading my model without getting the “is not a local folder and is not a valid model identifier listed on ‘Models - Hugging Face’If this is a private repository, make sure to pass a token having permission to this repo withuse_auth_tokenor log in withhuggingface-cli loginand passuse_auth_token=True” error. I assume this is something that should work, but i can’t figure out a way of doing it. Can anyone share tips on how to do this?(I’m not sure if it matters but im using a gradio type space).
2023-08-04T07:19:59Z
Figured it out, in case anyone else was wondering.If you set the secret’s name to HUGGING_FACE_HUB_TOKEN, you can just open private/gated models. I didn’t even need to pass set_auth_token or anything.