Spaces:
Sleeping
Sleeping
Commit History
-
feat: merge OCR words into line blocks before LayoutXLM
Goubaa +1: Claude Sonnet 4.6- Add merge_words_into_lines() in doctr_engine.py Groups words on the same line (y_thresh=15) and merges horizontally close words (x_gap_thresh=40) into single blocks. Reduces token count by ~70% (ex: 109 words -> 32 blocks). - Call merge_words_into_lines() in main.py pipeline Applied after clean_invoice_ocr(), before run_layoutxlm(). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6ae19be
-
feat: backend FastAPI OCR+LayoutXLM — model loaded from HF Hub
Goubaa63874d7