INNER CODE UNIT · Python
set_auth_token
Ki6an/fastT5 · fastT5/huggingface_utils.py:3
def set_auth_token(token):
"""Set the token which allows the user to authenticate to hugginface.co for downloading private models
Args:
token (Union[str, bool]): The token value to store. One of:
- an API key (from https://huggingface.co/organizations/ORGNAME/settings/token),
- a login token obtained by running `$ transformers-cli login`
- `True`, which tells transformers to use the login token stored in ~/.huggingface/token
Returns:
None
"""
global _auth_token
_auth_token = token
def get_auth_token():
"""Get the user-configurable auth token, which defaults to None