From e60bdb570cd466143a9d1087afbda8c0f995e363 Mon Sep 17 00:00:00 2001 From: Michele Dolfi Date: Mon, 4 Nov 2024 09:12:54 +0100 Subject: [PATCH] expose artifacts-path as argument Signed-off-by: Michele Dolfi --- docling/cli/main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docling/cli/main.py b/docling/cli/main.py index d9187c70f..8b48b54a9 100644 --- a/docling/cli/main.py +++ b/docling/cli/main.py @@ -163,6 +163,10 @@ def convert( TableFormerMode, typer.Option(..., help="The mode to use in the table structure model."), ] = TableFormerMode.FAST, + artifacts_path: Annotated[ + Optional[Path], + typer.Option(..., help="If provided, the location of the model artifacts."), + ] = None, abort_on_error: Annotated[ bool, typer.Option( @@ -231,6 +235,9 @@ def convert( pipeline_options.table_structure_options.do_cell_matching = True # do_cell_matching pipeline_options.table_structure_options.mode = table_mode + if artifacts_path is not None: + pipeline_options.artifacts_path = artifacts_path + match pdf_backend: case PdfBackend.DLPARSE_V1: backend: Type[PdfDocumentBackend] = DoclingParseDocumentBackend