Spaces:
Running
Running
| # === APPLICATION === | |
| ENVIRONMENT=development | |
| # Generate SECRET_KEY with: python -c "import secrets; print(secrets.token_hex(32))" | |
| SECRET_KEY=your-secret-key | |
| DEBUG=true | |
| ALLOWED_ORIGINS=http://localhost:3000 | |
| # Regex is used for Vercel preview/production URLs when credentials are enabled. | |
| ALLOWED_ORIGIN_REGEX=https://.*\.vercel\.app | |
| TRUSTED_HOSTS=localhost,127.0.0.1,*.vercel.app,*.hf.space | |
| FRONTEND_URL=http://localhost:3000 | |
| BACKEND_URL=http://localhost:8000 | |
| REQUIRE_EMAIL_VERIFICATION=false | |
| STRICT_CHEST_XRAY_INPUT=true | |
| VERSION=1.0.0 | |
| # === DATABASE === | |
| DATABASE_URL=sqlite+aiosqlite:///./medsight.db | |
| # Production: postgresql+asyncpg://user:pass@host/dbname | |
| # === JWT === | |
| # Generate JWT_SECRET_KEY separately from SECRET_KEY | |
| JWT_SECRET_KEY=your-jwt-secret-key | |
| JWT_ALGORITHM=HS256 | |
| ACCESS_TOKEN_EXPIRE_MINUTES=30 | |
| REFRESH_TOKEN_EXPIRE_DAYS=7 | |
| # === GOOGLE OAUTH === | |
| GOOGLE_CLIENT_ID=your-google-client-id | |
| GOOGLE_CLIENT_SECRET=your-google-client-secret | |
| GOOGLE_REDIRECT_URI=http://localhost:8000/api/v1/auth/google/callback | |
| # === HUGGINGFACE === | |
| HF_TOKEN= # from huggingface.co/settings/tokens | |
| HF_MODEL_REPO=hoshikrana/VAE_and_VIT_Anomaly_detection # HuggingFace repo for model checkpoints | |
| # === GEMINI API (for AI Chat) === | |
| # Get free API key from: https://aistudio.google.com/app/apikey | |
| GEMINI_API_KEY= | |
| # === ML CONFIG === | |
| MODEL_CACHE_DIR=C:/hf_cache | |
| # Place pulmonary_anomaly_detector.pth here (covid notebook export), or set PULMONARY_CHECKPOINT_PATH | |
| TRAINED_MODEL_OUTPUT_DIR=./results/outputs | |
| # auto | onnx | pulmonary | |
| VISION_ANOMALY_BACKEND=auto | |
| # PULMONARY_CHECKPOINT_PATH= | |
| # CONVAE_ONNX_PATH= | |
| # ANOMALY_STATS_PATH= | |
| TEMP_DIR=./backend/temp | |
| MAX_UPLOAD_SIZE_MB=10 | |
| GPU_VRAM_BUDGET_MB=3500 | |
| ANALYSIS_RETENTION_DAYS=7 | |
| # === FILE STORAGE === | |
| # local is simplest for development. Use r2 in production for durable object storage. | |
| STORAGE_BACKEND=local | |
| LOCAL_STORAGE_DIR=./data/uploads | |
| R2_ENDPOINT_URL= | |
| R2_ACCESS_KEY_ID= | |
| R2_SECRET_ACCESS_KEY= | |
| R2_BUCKET_NAME= | |
| R2_PUBLIC_BASE_URL= | |
| # === RATE LIMITING === | |
| RATE_LIMIT_ANALYZE=10/hour | |
| RATE_LIMIT_CHAT=50/hour | |
| RATE_LIMIT_AUTH=5/minute | |
| # === LOGGING === | |
| LOG_LEVEL=INFO | |
| LOG_DIR=./backend/logs | |