chandra-ocrlisted
Install: claude install-skill trku052-png/social-media-youtube-skills
# Chandra OCR
## Overview
[Chandra](https://github.com/datalab-to/chandra) (package `chandra-ocr` 0.2.0, model `datalab-to/chandra-ocr-2`) is a vision-language OCR model. For each page it produces HTML with layout labels (text, table, image, header, footer and so on), from which it derives Markdown, HTML and a list of layout chunks with bounding boxes. It covers 90+ languages, math, handwriting and checkbox forms. There are two inference methods: `vllm` (default; talks to a vLLM server, the base install is lightweight) and `hf` (loads the model locally with PyTorch and Transformers).
Licensing: the code is Apache 2.0, but the model weights use a modified OpenRAIL-M licence (free for research, personal use and startups under 2 million USD funding or revenue; not for competing with Datalab's API). Check the README's "Commercial usage" section before using it in a company product. Datalab also sells a hosted API.
## Instructions
### Install
```bash
python -m venv .venv && source .venv/bin/activate
pip install chandra-ocr # CLI + vLLM client
pip install "chandra-ocr[hf]" # adds torch, transformers, accelerate for local inference
pip install "chandra-ocr[app]" # adds the Streamlit demo
```
### Command line
```bash
# HuggingFace backend, local GPU
chandra scans/ ./ocr-output --method hf
# vLLM backend: start the server first (launches a Docker container), then convert
chandra_vllm
chandra scans/lease-2026-014.pdf ./ocr-output --method vllm --page-range