Spaces:
Sleeping
Sleeping
File size: 1,560 Bytes
50231a8 | 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 | # Configuration Reference
Configuration is managed with Pydantic Settings.
Evidence:
- `app/core/config.py`
- `.env.example`
- `docker-compose.yml`
## Application settings
| Variable | Default | Purpose |
|---|---|---|
| `APP_NAME` | `Classifier General API` | FastAPI title |
| `ENVIRONMENT` | `development` | environment label |
| `DEBUG` | `false` | debug mode |
## Filesystem settings
| Variable | Default | Purpose |
|---|---|---|
| `STATIC_DIR` | `static` | static root served at `/static` |
| `UPLOAD_SUBDIR` | `uploads` | upload directory under static root |
## Classifier integration settings
| Variable | Default | Purpose |
|---|---|---|
| `CLASSIFIER_SPACE` | `https://ayoubchlin-ayoubchlin-stable-bart-mnli-cnn.hf.space/` | Gradio/HF Space endpoint |
| `CLASSIFIER_API_NAME` | `/predict` | Gradio predict API name |
| `HUGGINGFACE_TOKEN` | empty | optional auth token for client init |
## Language detector settings
| Variable | Default | Purpose |
|---|---|---|
| `LANGUAGE_DETECTOR_URL` | `https://team-language-detector-languagedetector.hf.space/run/predict` | remote language endpoint |
| `REQUEST_TIMEOUT_SECONDS` | `30` | HTTP timeout for language requests |
## Label settings
| Variable | Default | Purpose |
|---|---|---|
| `DEFAULT_LABELS_CSV` | `news,sport,finance,politics` | initial in-memory labels |
## Behavior notes
- Labels are process-local in memory and reset on restart.
- Upload directory is auto-created at app startup.
Evidence:
- `app/services/label_service.py`
- `app/models/label_config.py`
- `app/main.py`
|