# ============================================================================= # XmLLM — Environment Configuration # ============================================================================= # Copy this file to .env and adjust values for your environment. # ----------------------------------------------------------------------------- # Execution mode # ----------------------------------------------------------------------------- # "local" or "space" — auto-detected from SPACE_ID if not set APP_MODE=local # ----------------------------------------------------------------------------- # Storage # ----------------------------------------------------------------------------- # Root directory for all persistent data (jobs, providers, exports, db). # On HF Spaces with persistent storage, use /data STORAGE_ROOT=./data # SQLite database path (relative to STORAGE_ROOT) DB_NAME=app.db # ----------------------------------------------------------------------------- # HuggingFace (only relevant in Space mode) # ----------------------------------------------------------------------------- # Set by HF automatically in Spaces — do not set manually in local mode # SPACE_ID= # HF_HOME=/data/.huggingface # HF_TOKEN — set as a Space secret for private model access # HF_TOKEN=hf_... # ----------------------------------------------------------------------------- # Server # ----------------------------------------------------------------------------- HOST=0.0.0.0 PORT=7860 LOG_LEVEL=info # ----------------------------------------------------------------------------- # Upload limits # ----------------------------------------------------------------------------- # Maximum upload file size in bytes (default: 50 MB) MAX_UPLOAD_SIZE=52428800 # Allowed MIME types for upload (comma-separated) ALLOWED_MIME_TYPES=image/png,image/jpeg,image/tiff,image/webp # ----------------------------------------------------------------------------- # Provider defaults # ----------------------------------------------------------------------------- # Default timeout for provider execution in seconds PROVIDER_TIMEOUT=120 # Default timeout for API-based providers in seconds API_PROVIDER_TIMEOUT=60 # Maximum retries for API-based providers API_PROVIDER_MAX_RETRIES=2 # ----------------------------------------------------------------------------- # Geometry # ----------------------------------------------------------------------------- # Tolerance in pixels for bbox containment checks (child bbox may exceed parent # by this many pixels without triggering a validation error) BBOX_CONTAINMENT_TOLERANCE=5 # ----------------------------------------------------------------------------- # Secrets (referenced by name in provider profiles, never serialized) # ----------------------------------------------------------------------------- # SECRET_OPENAI_API_KEY=sk-... # SECRET_HF_TOKEN=hf_...