visual-narrator-llm / hf_login.py
Ytgetahun's picture
feat: Visual Narrator 3B - Clean repository with professional benchmarks
d6e97b5
#!/usr/bin/env python3
"""
Login to Hugging Face Hub
"""
from huggingface_hub import login
import os
def hf_login():
print("πŸ” HUGGING FACE LOGIN")
print("=" * 40)
# Check for token in environment
token = os.environ.get('HF_TOKEN')
if not token:
print("❌ No HF_TOKEN found in environment")
print("πŸ’‘ Please set your token:")
print(" export HF_TOKEN=your_token_here")
return False
try:
login(token=token)
print("βœ… Successfully logged in to Hugging Face Hub")
return True
except Exception as e:
print(f"❌ Login failed: {e}")
return False
if __name__ == "__main__":
hf_login()