Spaces:
Running on Zero
Running on Zero
File size: 534 Bytes
e0169bf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | """The extractor interface shared by every backend."""
from __future__ import annotations
from typing import Protocol, runtime_checkable
# Reuse the existing result dataclass so there is exactly one definition in the codebase.
from src.openbmb_client import ExtractionResult
__all__ = ["Extractor", "ExtractionResult"]
@runtime_checkable
class Extractor(Protocol):
"""Anything that turns an uploaded document into structured lab values."""
def extract(self, file_path: str, max_pages: int = 3) -> ExtractionResult: ...
|