Spaces:
Running
Running
#!/usr/bin/env python3 | |
""" | |
Hugging Face Space entry point for GPQA evaluation | |
""" | |
import os | |
import sys | |
from dotenv import load_dotenv | |
# Load environment variables | |
load_dotenv() | |
# Set HF token if available | |
hf_token = os.getenv('HF_TOKEN') | |
if hf_token: | |
os.environ['HUGGING_FACE_HUB_TOKEN'] = hf_token | |
print("✅ HF Token configured") | |
# Import and run the app | |
from app import create_ui, start_evaluation_safe, check_environment | |
if __name__ == "__main__": | |
# Check environment | |
issues = check_environment() | |
if issues: | |
print("\n⚠️ Configuration issues:") | |
for issue in issues: | |
print(f" - {issue}") | |
print("\nThe app will run in demo mode.") | |
print("To enable GPQA evaluation, please set the required secrets in HF Space settings.") | |
else: | |
print("✅ All environment variables configured") | |
# Start evaluation in background | |
start_evaluation_safe() | |
# Create and launch UI | |
ui = create_ui() | |
ui.launch() | |