Files
wehub-resource-sync 925e56bb5f
Unit tests / build (t4_gpu) (push) Has been cancelled
Unit tests / build (ubuntu-latest) (push) Has been cancelled
Unit tests / build (windows-latest) (push) Has been cancelled
Test CLI scripts / build (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:24:56 +08:00

20 lines
568 B
Python

from typing import List
from pydantic import BaseModel
from surya.common.polygon import PolygonBox
class BlockOCRResult(PolygonBox):
label: str # canonicalized layout label (Picture, Text, ...)
raw_label: str = "" # original model label
reading_order: int # 0-indexed position in layout output
html: str = "" # block HTML (BLOCK_PROMPT output, "" if skipped)
skipped: bool = False # True if label was in SKIP_OCR_LABELS
error: bool = False
class PageOCRResult(BaseModel):
blocks: List[BlockOCRResult]
image_bbox: List[float]