smart_ide/docs/repo/service-chandra.md
4NK d6a61e7cbe chandra: document and script local HuggingFace install (hf extra, run-chandra-hf)
- Add install-local-hf.sh (uv sync --extra hf or pip install -e .[hf])
- Add run-chandra-hf.sh defaulting to --method hf
- Expand .env.example for upstream/local.env (MODEL_CHECKPOINT, TORCH_*)
2026-04-03 22:28:20 +02:00

1.6 KiB
Raw Blame History

Service Chandra OCR (services/chandra/)

OCR et extraction structurée (PDF / images → Markdown, HTML, JSON avec mise en page) via le projet amont datalab-to/chandra.

Rôle dans smart_ide

  • Numérisation de documents complexes (tableaux, formulaires, manuscrits, math).
  • Pas de listener HTTP dans ce dépôt : CLI chandra, lancée par services/chandra/run-chandra.sh après installation dans upstream/ (uv sync ou équivalent).

Licences

  • Code : Apache-2.0 (fichier LICENSE dans upstream/).
  • Poids du modèle : voir MODEL_LICENSE dans le sous-module amont et les conditions dusage commercial décrites dans le README Chandra.

Exploitation

Voir services/chandra/README.md et features/chandra-ocr-documents.md.

Hugging Face local (recommandé pour un poste de dev avec GPU) : depuis services/chandra/, exécuter ./install-local-hf.sh, copier .env.example vers upstream/local.env, puis ./run-chandra-hf.sh <entrée> <sortie>.

Configuration : upstream/local.env (chargé par lamont) — gabarit services/chandra/.env.example (MODEL_CHECKPOINT, TORCH_DEVICE, MAX_OUTPUT_TOKENS, TORCH_ATTN, HF_TOKEN si besoin).

Voir aussi