Spaces:
Sleeping
Sleeping
import os | |
from huggingface_hub import login | |
# Retrieve the HF token from the environment variables | |
hf_token = os.getenv("HF_TOKEN") | |
if hf_token is None: | |
raise ValueError("HF_TOKEN is not set in the environment variables.") | |
# Use the token to log in | |
login(token=hf_token) |