BakoAI / app /stat_import /ocr /base.py
Okidi Norbert
Deployment fix: clean backend only
c6abe34
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