mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-26 20:14:47 +00:00
merged with main and refactored the code to fix MyPy
Signed-off-by: Peter Staar <taa@zurich.ibm.com>
This commit is contained in:
parent
e596143bf8
commit
70872e6539
@ -14,6 +14,14 @@ from typing_extensions import deprecated
|
||||
|
||||
# Import the following for backwards compatibility
|
||||
from docling.datamodel.accelerator_options import AcceleratorDevice, AcceleratorOptions
|
||||
from docling.datamodel.asr_model_specs import (
|
||||
WHISPER_BASE,
|
||||
WHISPER_LARGE,
|
||||
WHISPER_MEDIUM,
|
||||
WHISPER_SMALL,
|
||||
WHISPER_TINY,
|
||||
WHISPER_TURBO,
|
||||
)
|
||||
from docling.datamodel.layout_model_specs import (
|
||||
DOCLING_LAYOUT_EGRET_LARGE,
|
||||
DOCLING_LAYOUT_EGRET_MEDIUM,
|
||||
|
@ -6,7 +6,10 @@ from pydantic import (
|
||||
)
|
||||
|
||||
from docling.datamodel.accelerator_options import AcceleratorDevice
|
||||
from docling.datamodel.layout_model_specs import docling_layout_heron
|
||||
from docling.datamodel.layout_model_specs import (
|
||||
DOCLING_LAYOUT_HERON,
|
||||
DOCLING_LAYOUT_V2,
|
||||
)
|
||||
from docling.datamodel.pipeline_options_vlm_model import (
|
||||
ApiVlmOptions,
|
||||
InferenceFramework,
|
||||
@ -140,7 +143,7 @@ GEMMA3_27B_MLX = InlineVlmOptions(
|
||||
)
|
||||
|
||||
VLM2STAGE = TwoStageVlmOptions(
|
||||
vlm_options=SMOLDOCLING_MLX, layout_options=docling_layout_heron
|
||||
vlm_options=SMOLDOCLING_MLX, layout_options=DOCLING_LAYOUT_HERON
|
||||
)
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ from docling.datamodel.document import ConversionResult
|
||||
from docling.datamodel.layout_model_specs import DOCLING_LAYOUT_V2, LayoutModelConfig
|
||||
from docling.datamodel.pipeline_options import LayoutOptions
|
||||
from docling.datamodel.settings import settings
|
||||
from docling.models.base_model import BaseLayoutModel
|
||||
from docling.models.base_model import BaseLayoutModel, BasePageModel
|
||||
from docling.models.utils.hf_model_download import download_hf_model
|
||||
from docling.utils.accelerator_utils import decide_device
|
||||
from docling.utils.layout_postprocessor import LayoutPostprocessor
|
||||
@ -26,7 +26,7 @@ from docling.utils.visualization import draw_clusters
|
||||
_log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class LayoutModel(BasePageModel):
|
||||
class LayoutModel(BaseLayoutModel):
|
||||
TEXT_ELEM_LABELS = [
|
||||
DocItemLabel.TEXT,
|
||||
DocItemLabel.FOOTNOTE,
|
||||
|
Loading…
Reference in New Issue
Block a user