classifier-general / docs /reference /configuration.md
AyoubChLin's picture
feat: initial commit of Classifier General API with FastAPI
50231a8

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