tomngdev commited on
Commit
5fa34d5
·
verified ·
1 Parent(s): c62fdad

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +19 -6
README.md CHANGED
@@ -14,11 +14,24 @@ Fully client-side OCR: text detection + CTC recognition + reading order +
14
  orientation, running on [onnxruntime-web](https://onnxruntime.ai/docs/get-started/web)
15
  (WebGPU when available, wasm otherwise). No server, no data leaves your machine.
16
 
17
- - Models: [tomngdev/indra-ocr-onnx](https://huggingface.co/tomngdev/indra-ocr-onnx)
 
 
18
  (ONNX exports of [datalab-to/indra-ocr](https://huggingface.co/datalab-to/indra-ocr) v3.1.1)
19
- - Library + code: [indra-ocr-web](https://github.com/) — see the model repo for
20
- `indra-ocr-web.mjs`, the drop-in browser loader.
 
 
 
21
 
22
- Pre/post-processing is ported from the
23
- [indra-ocr Python package](https://github.com/datalab-to/indra). Example page
24
- images are from the same Apache-2.0 repository.
 
 
 
 
 
 
 
 
 
14
  orientation, running on [onnxruntime-web](https://onnxruntime.ai/docs/get-started/web)
15
  (WebGPU when available, wasm otherwise). No server, no data leaves your machine.
16
 
17
+ - **Try an example** — draws a page in-page and runs it, or drop your own image.
18
+ - Models stream once from
19
+ [tomngdev/indra-ocr-onnx](https://huggingface.co/tomngdev/indra-ocr-onnx)
20
  (ONNX exports of [datalab-to/indra-ocr](https://huggingface.co/datalab-to/indra-ocr) v3.1.1)
21
+ and are cached by the browser.
22
+ - Everything else — app + `indra-ocr-web` library — is bundled **into the single
23
+ `index.html`**, so the page makes no relative requests and works from any URL
24
+ it is served at. The only external loads are absolute: the onnxruntime-web
25
+ module (CDN, pinned via an import map) and the model downloads (Hub).
26
 
27
+ ## Rebuild
28
+
29
+ ```bash
30
+ node space/build.mjs # in the indra-ocr-web repo; bundles app.mjs + library via esbuild
31
+ ```
32
+
33
+ The importable library (for your own pages) lives in the model repo:
34
+ `indra-ocr-web.mjs` + `src/` on
35
+ [tomngdev/indra-ocr-onnx](https://huggingface.co/tomngdev/indra-ocr-onnx) — note
36
+ the Hub serves `.mjs` as `text/plain`, so host those files yourself (or bundle
37
+ them) rather than importing them from the Hub.