Human-in-the-loop text classification app for creating benchmark labels.
- Backend: FastAPI, SQLAlchemy async, fastapi-users, Pydantic v2
- Frontend: Quasar (Vue 3 + TypeScript)
- DB: SQLite by default (
DATABASE_URLcan point to PostgreSQL)
cd backend
pip install -r requirements.txt
PORT=8005 ALLOWED_ORIGIN=http://localhost:9005 python run.pyBackend defaults to http://localhost:8002 if PORT is not set.
cd frontend
npm install
API_URL=http://localhost:8005 quasar dev -p 9005 -h 0.0.0.0API_URL is injected by Quasar build config (build.env) and used by axios boot file.
cd frontend
API_URL=http://api.example.com:8005 npm run buildThe compiled app will call that API URL at runtime.
GET /api/tasksGET /api/tasks/{task_id}POST /api/texts/nextPOST /api/annotationsGET /api/stats/meGET /api/stats/leaderboard/{task_id}GET /api/admin/tasksPOST /api/admin/tasksPUT /api/admin/tasks/{task_id}PATCH /api/admin/tasks/{task_id}POST /api/admin/textsPOST /api/admin/tasks/import-prompts
- Task definitions are stored in DB and support single-choice or multi-choice labels. Each class may carry an optional
descriptionshown as a tooltip to annotators. - Text uploads are JSONL; full row JSON is stored for downstream benchmarking/export. Individual texts can be suspended by admins to exclude them from the annotation queue.
- Users may set a
display_nameat registration; this name appears in the navbar and on leaderboards.
cd deploy
docker compose up --build- Frontend:
http://localhost:9000 - Backend:
http://localhost:8002
Use deploy/frontend.Dockerfile build arg to set API URL:
docker build -f deploy/frontend.Dockerfile --build-arg API_URL=http://localhost:8002 -t text-classifier-frontend .