Spaces:
Sleeping
Sleeping
File size: 2,907 Bytes
96f8c0a 13a1f4e 96f8c0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | # =============================================================================
# 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_...
|