Skip to content

Commit

Permalink
expose artifacts-path as argument
Browse files Browse the repository at this point in the history
Signed-off-by: Michele Dolfi <[email protected]>
  • Loading branch information
dolfim-ibm committed Nov 4, 2024
1 parent 8902d1e commit e60bdb5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docling/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e60bdb5

Please sign in to comment.