import os from huggingface_hub import HfApi token = os.getenv("HF_TOKEN") # loaded from .env or system environment api = HfApi(token=token)