Spaces:
Running
Running
| from abc import ABC, abstractmethod | |
| from typing import List, Dict, Any | |
| class BaseEngine(ABC): | |
| def process(self, image_path: str) -> Any: | |
| pass | |
| class BaseOCR(BaseEngine): | |
| def extract_text(self, image_path: str) -> str: | |
| pass | |
| class BaseVLM(BaseEngine): | |
| def extract_structured_data(self, image_path: str, prompt: str) -> Dict[str, Any]: | |
| pass | |
| class BaseNER(BaseEngine): | |
| def extract_entities(self, text: str, labels: List[str]) -> Dict[str, List[str]]: | |
| pass | |