From 6832c5aebadc3ce8276f026bdc0ae422579b0905 Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Fri, 13 Dec 2024 15:44:06 +0100 Subject: [PATCH] Review fixes Signed-off-by: Christoph Auer --- docling/datamodel/pipeline_options.py | 2 +- docs/examples/custom_convert.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docling/datamodel/pipeline_options.py b/docling/datamodel/pipeline_options.py index 996cfff2..4e3c7680 100644 --- a/docling/datamodel/pipeline_options.py +++ b/docling/datamodel/pipeline_options.py @@ -135,7 +135,7 @@ class EasyOcrOptions(OcrOptions): kind: Literal["easyocr"] = "easyocr" lang: List[str] = ["fr", "de", "es", "en"] use_gpu: Annotated[ - int, + bool, Field( deprecated="Deprecated field. Better to set the `accelerator_options.device` in `pipeline_options`. " "When `use_gpu and accelerator_options.device == AcceleratorDevice.CUDA` the GPU is used " diff --git a/docs/examples/custom_convert.py b/docs/examples/custom_convert.py index 12893e22..a7efa975 100644 --- a/docs/examples/custom_convert.py +++ b/docs/examples/custom_convert.py @@ -74,7 +74,7 @@ def main(): pipeline_options.do_ocr = True pipeline_options.do_table_structure = True pipeline_options.table_structure_options.do_cell_matching = True - pipeline_options.ocr_options.lang = "es" + pipeline_options.ocr_options.lang = ["es"] pipeline_options.accelerator_options = AcceleratorOptions( num_threads=4, device=Device.AUTO )