smart_ide/docs/features/chandra-ocr-documents.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

20 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Chandra OCR — documents structurés
## Contexte
[Chandra OCR 2](https://github.com/datalab-to/chandra) (Datalab) produit des sorties **Markdown**, **HTML** et **JSON** à partir de PDF et dimages, en préservant la structure (tableaux, zones, légendes). Deux modes dinférence sont documentés amont : **vLLM** (serveur) et **Hugging Face** (local, dépendances plus lourdes).
## Intégration smart_ide
- Répertoire : **`services/chandra/`** avec sous-module **`upstream/`**.
- **Inférence locale Hugging Face** : **`./install-local-hf.sh`** puis **`./run-chandra-hf.sh <pdf|dossier> <dossier_sortie>`** ; configuration **`upstream/local.env`** (voir **`services/chandra/.env.example`**).
- Autres modes : **`./run-chandra.sh`** avec **`--method vllm`** ou **`hf`** selon linstallation.
## Chaînage possible
Sortie Markdown exploitable par **PageIndex** (`--md_path`) ou par des pipelines dingestion **AnythingLLM** / **docv**, selon les politiques de données du projet.
## Documentation liée
- [repo/service-chandra.md](../repo/service-chandra.md)