Spaces:
Sleeping
Sleeping
| # ============================================================================ | |
| # Learning Outcome OS AI Service V2 - Environment Configuration | |
| # ============================================================================ | |
| # Copy this file to .env and update values for your environment | |
| # Never commit .env to version control | |
| # ============================================================================ | |
| # Service Configuration | |
| # ============================================================================ | |
| AI_SERVICE_NAME=LearningOutcomeOS-AI-V2 | |
| AI_SERVICE_VERSION=2.0.0 | |
| LOG_LEVEL=INFO | |
| HOST=0.0.0.0 | |
| PORT=7860 | |
| # ============================================================================ | |
| # Paths (Update these based on your deployment environment) | |
| # ============================================================================ | |
| # Local development | |
| # MODEL_ARTIFACT_DIR=./artifacts/models | |
| # DATASET_DIR=../learning_outcome_os_dataset_v2 | |
| # Hugging Face Space deployment | |
| MODEL_ARTIFACT_DIR=/data/artifacts/models | |
| DATASET_DIR=/data/learning_outcome_os_dataset_v2 | |
| METRICS_DIR=/data/artifacts/metrics | |
| REPORTS_DIR=/data/artifacts/reports | |
| FEEDBACK_DIR=/data/artifacts/feedback | |
| # ============================================================================ | |
| # Security & Privacy | |
| # ============================================================================ | |
| # IMPORTANT: Generate a random string for LOG_SALT | |
| # Example: openssl rand -hex 32 | |
| # This is used to anonymize student IDs in logs | |
| LOG_SALT=hf-space-default-salt | |
| # API Key for inter-service authentication (optional) | |
| # API_KEY=your-secret-api-key-here | |
| # ============================================================================ | |
| # Model Configuration | |
| # ============================================================================ | |
| # Confidence threshold below which predictions use fallback logic | |
| LOW_CONFIDENCE_THRESHOLD=0.55 | |
| # Random seed for reproducibility | |
| SEED=20260520 | |
| # ============================================================================ | |
| # Database Configuration (for future use) | |
| # ============================================================================ | |
| # DATABASE_URL=postgresql://user:password@localhost/learning_outcome_os | |
| # REDIS_URL=redis://localhost:6379/0 | |
| # ============================================================================ | |
| # Monitoring & Logging | |
| # ============================================================================ | |
| # Enable detailed request/response logging | |
| DEBUG=False | |
| # Sentry error tracking (optional) | |
| # SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-id | |
| # ============================================================================ | |
| # CORS Configuration | |
| # ============================================================================ | |
| # Comma-separated list of allowed origins | |
| ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000,https://your-frontend-domain.com | |
| # ============================================================================ | |
| # Rate Limiting (optional) | |
| # ============================================================================ | |
| # Requests per minute per IP | |
| RATE_LIMIT_PER_MINUTE=60 | |
| # ============================================================================ | |
| # Feature Flags | |
| # ============================================================================ | |
| # Enable/disable specific features | |
| ENABLE_EXPLAINABILITY=true | |
| ENABLE_PREDICTION_LOGGING=true | |
| ENABLE_TEACHER_FEEDBACK=true | |
| # ============================================================================ | |
| # Performance Tuning | |
| # ============================================================================ | |
| # Number of uvicorn workers (Hugging Face Space uses 1 worker by default) | |
| WORKERS=1 | |
| # Request timeout in seconds | |
| REQUEST_TIMEOUT=120 | |
| # Model loading timeout in seconds | |
| MODEL_LOAD_TIMEOUT=60 | |