From 6882e6c38df30e4d4a1b83e01b13900ca7ea001f Mon Sep 17 00:00:00 2001 From: Michele Dolfi <97102151+dolfim-ibm@users.noreply.github.com> Date: Tue, 28 Jan 2025 06:26:03 +0100 Subject: [PATCH] feat(CLI): Expose code and formula models in the CLI (#820) feat: expose code and formula models in the CLI Signed-off-by: Michele Dolfi --- docling/cli/main.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docling/cli/main.py b/docling/cli/main.py index 02b22e7f..7d31221d 100644 --- a/docling/cli/main.py +++ b/docling/cli/main.py @@ -211,6 +211,14 @@ def convert( TableFormerMode, typer.Option(..., help="The mode to use in the table structure model."), ] = TableFormerMode.FAST, + enrich_code: Annotated[ + bool, + typer.Option(..., help="Enable the code enrichment model in the pipeline."), + ] = False, + enrich_formula: Annotated[ + bool, + typer.Option(..., help="Enable the formula enrichment model in the pipeline."), + ] = False, artifacts_path: Annotated[ Optional[Path], typer.Option(..., help="If provided, the location of the model artifacts."), @@ -365,6 +373,8 @@ def convert( do_ocr=ocr, ocr_options=ocr_options, do_table_structure=True, + do_code_enrichment=enrich_code, + do_formula_enrichment=enrich_formula, document_timeout=document_timeout, ) pipeline_options.table_structure_options.do_cell_matching = (