Files
LegacyHUB/app/ingestion/docling_extractor.py
Vadim Malanov 4fcec8039b
Some checks failed
CI / Backend (lint + tests + compose) (push) Has been cancelled
CI / Frontend (lint + type-check + build) (push) Has been cancelled
chore: pin document recognition engine
2026-06-25 11:43:29 +03:00

21 lines
530 B
Python

"""LegacyHUB adapter for the shared Docling recognition engine."""
from __future__ import annotations
from pathlib import Path
from teamhub_document_recognition_engine import (
ExtractedBlock,
ExtractedFigure,
ExtractedPage,
ExtractedTable,
ExtractionResult,
)
from teamhub_document_recognition_engine import extract as _engine_extract
from app.config import settings
def extract(pdf_path: Path) -> ExtractionResult:
return _engine_extract(pdf_path, docling_ocr_enabled=settings.docling_ocr_enabled)