from abc import ABC, abstractmethod from typing import List, Optional from app.stat_import.schemas import RawOCRBlock class OCRProvider(ABC): @abstractmethod def extract_blocks(self, image_bytes: bytes, **kwargs) -> List[RawOCRBlock]: """ Extract bounding boxes and text from an image. Returns a list of RawOCRBlock containing the coordinates and confidence. """ pass