Skip to content

Use logged in hf token using huggingface_hub.get_token() instead of requiring env variable #23

@abidlabs

Description

@abidlabs

A more robust way to get the logged in HF user would to be just:

from huggingface_hub import get_token

token = get_token()
print(token) 

which will read the token, instead of requiring it to be set via an env variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions