| """Runtime configuration. Detects whether we are on HF Spaces (real models) | |
| or local dev (mocks), and centralises the image-model repo + canvas size. | |
| SPACE_ID is set automatically by HF Spaces at runtime. | |
| See https://huggingface.co/docs/hub/en/spaces-overview#built-in-environment-variables | |
| LLM model selection lives in `game/models.py` (the roster) — per-character. | |
| """ | |
| import os | |
| IS_SPACES: bool = bool(os.getenv("SPACE_ID")) | |
| FORCE_REAL_MODELS: bool = os.getenv("FORCE_REAL_MODELS") == "1" | |
| USE_REAL_MODELS: bool = IS_SPACES or FORCE_REAL_MODELS | |
| IMAGE_REPO_ID = "black-forest-labs/FLUX.2-klein-4B" | |
| BACKGROUND_WIDTH = 1024 | |
| BACKGROUND_HEIGHT = 576 | |