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 <dol@zurich.ibm.com>
This commit is contained in:
Michele Dolfi 2025-01-28 06:26:03 +01:00 committed by GitHub
parent 4d41db3f7a
commit 6882e6c38d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 = (