pages-converter-pro / test_token.py
SlouchyBuffalo's picture
Create test_token.py
fbb55fa verified
raw
history blame contribute delete
283 Bytes
import os
from huggingface_hub import whoami
token = os.getenv("HF_TOKEN")
print(f"Token exists: {token is not None}")
if token:
try:
user_info = whoami(token)
print(f"Token works! User: {user_info}")
except Exception as e:
print(f"Token error: {e}")