From cf2606825afbdfaefb1555bc0a04e856b562503f Mon Sep 17 00:00:00 2001 From: Nikos Livathinos <100353117+nikos-livathinos@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:03:06 +0100 Subject: [PATCH 1/2] docs: Fix the path to the run_with_accelerator.py example (#608) docs: Fix the path to the run_with_accelerator.py example Signed-off-by: Nikos Livathinos Signed-off-by: Christoph Auer --- mkdocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 1dd8c345..c7802583 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -75,7 +75,7 @@ nav: - "Table export": examples/export_tables.py - "Multimodal export": examples/export_multimodal.py - "Force full page OCR": examples/full_page_ocr.py - - "Accelerator options": examples/run_with_acclerators.py + - "Accelerator options": examples/run_with_accelerator.py - Chunking: - "Hybrid chunking": examples/hybrid_chunking.ipynb - RAG / QA: From 1f5b1d46ab371b0a3d07cfe1a2db8031727cdcf9 Mon Sep 17 00:00:00 2001 From: itsainii Date: Tue, 17 Dec 2024 16:47:18 +0800 Subject: [PATCH 2/2] feat: Add Easyocr parameter recog_network (#613) * Update easyocr_model.py Added this line of code to get recog_network of easyocr parameter recog_network = self.options.recog_network Signed-off-by: itsainii * Update pipeline_options.py Added this line in EasyOcrOptions function recog_network: Optional[str] = 'standard' Signed-off-by: itsainii * Add Easyocr recog_network parameter Signed-off-by: itsainii --------- Signed-off-by: itsainii Signed-off-by: Christoph Auer --- docling/datamodel/pipeline_options.py | 1 + docling/models/easyocr_model.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docling/datamodel/pipeline_options.py b/docling/datamodel/pipeline_options.py index cf1689da..0f750dbc 100644 --- a/docling/datamodel/pipeline_options.py +++ b/docling/datamodel/pipeline_options.py @@ -140,6 +140,7 @@ class EasyOcrOptions(OcrOptions): use_gpu: Optional[bool] = None model_storage_directory: Optional[str] = None + recog_network: Optional[str] = "standard" download_enabled: bool = True model_config = ConfigDict( diff --git a/docling/models/easyocr_model.py b/docling/models/easyocr_model.py index 5de1409c..1a8294b2 100644 --- a/docling/models/easyocr_model.py +++ b/docling/models/easyocr_model.py @@ -66,6 +66,7 @@ class EasyOcrModel(BaseOcrModel): lang_list=self.options.lang, gpu=use_gpu, model_storage_directory=self.options.model_storage_directory, + recog_network=self.options.recog_network, download_enabled=self.options.download_enabled, verbose=False, )