Spaces:
Build error
Build error
| from dotenv import load_dotenv | |
| import os | |
| load_dotenv() # Looks for a file named ".env" in the current directory | |
| api_key = os.getenv("OPENAI_API_KEY") | |
| if api_key: | |
| print("✅ API key loaded successfully.") | |
| print("First 8 characters:", api_key[:8] + "...") | |
| else: | |
| print("❌ API key not found. Check your .env file formatting.") | |