Spaces:
Running
Running
File size: 1,539 Bytes
db720e4 f29eea6 db720e4 f29eea6 db720e4 f29eea6 db720e4 f29eea6 bbcf032 e847b33 f29eea6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | ---
title: litert-ocr
emoji: 📄
sdk: static
app_file: index.html
pinned: false
license: apache-2.0
short_description: Photo, scan or PDF to text, Markdown and JSON, in-browser
models:
- litert-community/PP-OCRv6-Small-LiteRT
custom_headers:
cross-origin-embedder-policy: require-corp
cross-origin-opener-policy: same-origin
cross-origin-resource-policy: cross-origin
---
# litert-ocr: photo, scan or PDF → text, Markdown and JSON
Choose a photo, a scan or a PDF (or drop one, or paste a screenshot), and [litert-ocr](https://github.com/john-rocky/litert-ocr) reads it in this browser tab: every text line with its box, a PDF's page with a frame around each block, Markdown with headings and tables, and JSON. It runs PP-OCRv6 Small ([litert-community/PP-OCRv6-Small-LiteRT](https://huggingface.co/litert-community/PP-OCRv6-Small-LiteRT)) on LiteRT.js. Your files are not uploaded. The page downloads the library, its LiteRT.js runtime and pdf.js from jsDelivr and the model files from Hugging Face, once, and the browser keeps them.
The same page without the Space's frame: https://mlboydaisuke-litert-ocr.static.hf.space/. Inside the frame, Chrome on a Galaxy S26 read more slowly.
- This page's code: [demo/](https://github.com/john-rocky/litert-ocr/tree/main/demo) in john-rocky/litert-ocr (the same page is on [GitHub Pages](https://john-rocky.github.io/litert-ocr/))
- The library: `npm install litert-ocr`, [README](https://github.com/john-rocky/litert-ocr)
- The examples: [examples/SOURCES.md](examples/SOURCES.md)
|