- 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_*)
20 lines
1.1 KiB
Markdown
20 lines
1.1 KiB
Markdown
# 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 d’images, en préservant la structure (tableaux, zones, légendes). Deux modes d’infé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 l’installation.
|
||
|
||
## Chaînage possible
|
||
|
||
Sortie Markdown exploitable par **PageIndex** (`--md_path`) ou par des pipelines d’ingestion **AnythingLLM** / **docv**, selon les politiques de données du projet.
|
||
|
||
## Documentation liée
|
||
|
||
- [repo/service-chandra.md](../repo/service-chandra.md)
|