feat: package updates and more cuda images (#229)

Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi
2025-06-24 09:59:05 -05:00
committed by GitHub
parent 717fb3a8d8
commit 30aca92298
13 changed files with 2151 additions and 1489 deletions

View File

@@ -8,8 +8,8 @@ from docling.datamodel.base_models import InputFormat, OutputFormat
from docling.datamodel.pipeline_options import (
EasyOcrOptions,
PdfBackend,
PdfPipeline,
PictureDescriptionBaseOptions,
ProcessingPipeline,
TableFormerMode,
TableStructureOptions,
)
@@ -227,9 +227,9 @@ class ConvertDocumentsOptions(BaseModel):
] = TableStructureOptions().mode
pipeline: Annotated[
PdfPipeline,
ProcessingPipeline,
Field(description="Choose the pipeline to process PDF or image files."),
] = PdfPipeline.STANDARD
] = ProcessingPipeline.STANDARD
page_range: Annotated[
PageRange,

View File

@@ -19,10 +19,10 @@ from docling.datamodel.document import ConversionResult
from docling.datamodel.pipeline_options import (
OcrOptions,
PdfBackend,
PdfPipeline,
PdfPipelineOptions,
PictureDescriptionApiOptions,
PictureDescriptionVlmOptions,
ProcessingPipeline,
TableFormerMode,
VlmPipelineOptions,
smoldocling_vlm_conversion_options,
@@ -217,7 +217,7 @@ def get_pdf_pipeline_opts(
)
pipeline_options: Union[PdfPipelineOptions, VlmPipelineOptions]
if request.pipeline == PdfPipeline.STANDARD:
if request.pipeline == ProcessingPipeline.STANDARD:
pipeline_options = _parse_standard_pdf_opts(request, artifacts_path)
backend = _parse_backend(request)
pdf_format_option = PdfFormatOption(
@@ -225,7 +225,7 @@ def get_pdf_pipeline_opts(
backend=backend,
)
elif request.pipeline == PdfPipeline.VLM:
elif request.pipeline == ProcessingPipeline.VLM:
pipeline_options = _parse_vlm_pdf_opts(request, artifacts_path)
pdf_format_option = PdfFormatOption(
pipeline_cls=VlmPipeline, pipeline_options=pipeline_options

View File

@@ -16,7 +16,7 @@ import httpx
from docling.datamodel.base_models import FormatToExtensions
from docling.datamodel.pipeline_options import (
PdfBackend,
PdfPipeline,
ProcessingPipeline,
TableFormerMode,
TableStructureOptions,
)
@@ -587,9 +587,9 @@ with gr.Blocks(
with gr.Row():
with gr.Column(scale=1, min_width=200):
pipeline = gr.Radio(
[(v.value.capitalize(), v.value) for v in PdfPipeline],
[(v.value.capitalize(), v.value) for v in ProcessingPipeline],
label="Pipeline type",
value=PdfPipeline.STANDARD.value,
value=ProcessingPipeline.STANDARD.value,
)
with gr.Row():
with gr.Column(scale=1, min_width=200):