Spaces:
Running
Running
| import os | |
| from dotenv import load_dotenv | |
| from smolagents import LiteLLMModel | |
| load_dotenv() | |
| # API Configuration | |
| API_KEY = os.getenv("OPENAI_API_KEY", "ANTHROPIC_API_KEY") | |
| if not API_KEY: | |
| print("⚠️ API key not found in .env file!") | |
| NASA_FIRMS_MAP_KEY = os.getenv("NASA_FIRMS_MAP_KEY", "b16df29134bfb809c751d7e283c71312") | |
| # Server configuration | |
| GRADIO_SERVER_NAME = os.getenv("GRADIO_SERVER_NAME", "0.0.0.0") | |
| GRADIO_SERVER_PORT = int(os.getenv("GRADIO_SERVER_PORT", "7860")) | |
| GRADIO_SHARE = os.getenv("GRADIO_SHARE", "False").lower() == "true" | |
| # Model configuration | |
| MODEL_ID = os.getenv("MODEL_ID", "anthropic/claude-sonnet-4-20250514") | |
| # Initialize the model | |
| model = LiteLLMModel(model_id=MODEL_ID, api_key=API_KEY) | |