Spaces:
Sleeping
Sleeping
Switch default recognition to LightOnOCR; add Try these moments tour
Browse filesMirror of brave-new-demos commits 03b4c32 + 1a1b995.
- Default recognition is now lightonai/LightOnOCR-2-1B (was Florence-2-base).
Better Markdown on dense layouts; ~4 GB cold download.
- New 'Try these moments' UI section above the main panels with four
concrete prompts visitors can act on without reading the README.
The HF entrypoint still has empty PRELOAD by default, so the Space still
boots in ~30 s; first sample click will now trigger a LightOnOCR download
on the cache miss.
Files changed (3)
7 unmodified lines891011121314151617181920212223242526272829307 unmodified lines};export const RECOGNITION_MODELS: ModelOption[] = [{id: "microsoft/Florence-2-base",label: "Florence-2-base (small, fast)",description: "Microsoft DaViT + decoder, 270M. Default OCR with the <OCR> task. Fast on CPU.",options: { task: "<OCR>" },},{id: "microsoft/Florence-2-large",label: "Florence-2-large",description: "Larger Florence-2 variant, 770M. Higher quality, still CPU-runnable; ~2x latency.",options: { task: "<OCR>" },},{id: "lightonai/LightOnOCR-2-1B",label: "LightOnOCR-2-1B (premium, GPU recommended)",description: "Pixtral encoder + Qwen3 decoder, 2.1B. Markdown output. Loads on CPU but slow under Rosetta.",},{id: "PaddlePaddle/PaddleOCR-VL-1.5",label: "PaddleOCR-VL-1.5 (GPU image)",7 unmodified lines891011121314151617181920212223242526272829307 unmodified lines};export const RECOGNITION_MODELS: ModelOption[] = [{id: "lightonai/LightOnOCR-2-1B",label: "LightOnOCR-2-1B (default)",description: "Pixtral encoder + Qwen3 decoder, 2.1B. Strong Markdown output across dense layouts. ~4 GB to download on first call.",},{id: "microsoft/Florence-2-base",label: "Florence-2-base (small, fast)",description: "Microsoft DaViT + decoder, 270M. Fast on CPU but terse on dense layouts; better on multi-column text.",options: { task: "<OCR>" },},{id: "microsoft/Florence-2-large",label: "Florence-2-large",description: "Larger Florence-2 variant, 770M. Better than Florence-2-base but still leans terse on receipts.",options: { task: "<OCR>" },},{id: "PaddlePaddle/PaddleOCR-VL-1.5",label: "PaddleOCR-VL-1.5 (GPU image)",
65 unmodified lines66676869707165 unmodified lines</p></section><main><section class="panel" id="panel-events"><header><h2>Sample documents</h2></header>65 unmodified lines66676869707172737475767778798081828384858687888990919293949596979865 unmodified lines</p></section><section class="tour"><h3>Try these moments</h3><ol class="tour-list"><li><strong>Click any sample on the left.</strong> All three models runin one pipeline. The footer prints per-stage timings as each onelands.</li><li><strong>Open "See the SIE call"</strong> in any panel, then swap themodel dropdown above. The snippet updates with the one parameterthat changed. That is the swap-a-string pitch in action.</li><li><strong>Click the receipt, then the multi-column page.</strong>Donut (fine-tuned on receipts) dominates the first; recognitiondominates the second. Same pipeline, different model wins.</li><li><strong>Switch NER from <code>gliner_multi</code> to<code>gliner_large</code>.</strong> Same labels, same input text,different confidence scores. Model quality is a single dropdownaway.</li></ol></section><main><section class="panel" id="panel-events"><header><h2>Sample documents</h2></header>
109 unmodified lines110111112113114115109 unmodified lines}.why-sie p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 1100px; }main {flex: 1; display: grid;grid-template-columns: 0.95fr 1.4fr 1.2fr;109 unmodified lines110111112113114115116117118119120121122123124125126127128129130131132133134135136137138109 unmodified lines}.why-sie p { margin: 0; color: var(--muted); line-height: 1.6; max-width: 1100px; }.tour {padding: 12px 20px; border-bottom: 1px solid var(--line);background: rgba(98,182,255,0.04);}.tour h3 {margin: 0 0 6px 0; font-size: 11px; letter-spacing: 0.6px;text-transform: uppercase; color: var(--accent-2); font-weight: 600;}.tour-list {margin: 0; padding-left: 22px;color: var(--muted); line-height: 1.55;max-width: 1100px;display: grid;grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));gap: 4px 24px;}.tour-list li { padding: 3px 0; }.tour-list strong { color: var(--text); font-weight: 600; }.tour-list code {background: var(--line); padding: 1px 5px; border-radius: 3px;color: var(--accent-2); font-size: 11px;}main {flex: 1; display: grid;grid-template-columns: 0.95fr 1.4fr 1.2fr;
src/config.ts+7-7
web/public/index.html+27
web/public/style.css+23