File size: 308 Bytes
e241a3a
 
 
fdeca56
e241a3a
 
 
 
fdeca56
e241a3a
 
1
2
3
4
5
6
7
8
9
10
11
12
import os
from huggingface_hub import login

# Get Hugging Face token from environment variables
hf_token = os.getenv("HF_API_TOKEN")

if hf_token:
    login(token=hf_token)
    print("lgin sucessfull")
else:
    raise ValueError("Hugging Face token is missing. Please set it in the environment variables.")