feat: Layout model specification and multiple choices (#1910)

* Establish layout_model spec and example instantations

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Updated naming

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Back to uppercase constants

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* fix deps issue with openai-whipser>numba>llvmlite

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

* Pull v1 changed test GT from main

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>

---------

Signed-off-by: Christoph Auer <cau@zurich.ibm.com>
This commit is contained in:
Christoph Auer
2025-07-10 06:37:27 +02:00
committed by GitHub
parent ec588df971
commit 2b8616d6d5
19 changed files with 923 additions and 791 deletions

View File

@@ -2,6 +2,7 @@ import logging
from pathlib import Path
from typing import Optional
from docling.datamodel.layout_model_specs import DOCLING_LAYOUT_V2
from docling.datamodel.pipeline_options import (
granite_picture_description,
smolvlm_picture_description,
@@ -46,7 +47,7 @@ def download_models(
if with_layout:
_log.info("Downloading layout model...")
LayoutModel.download_models(
local_dir=output_dir / LayoutModel._model_repo_folder,
local_dir=output_dir / DOCLING_LAYOUT_V2.model_repo_folder,
force=force,
progress=progress,
)