Skip to content

Commit

Permalink
feat: Add Easyocr parameter recog_network (#613)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* Update pipeline_options.py

Added this line in EasyOcrOptions function

recog_network: Optional[str] = 'standard'

Signed-off-by: itsainii <[email protected]>

* Add Easyocr recog_network parameter

Signed-off-by: itsainii <[email protected]>

---------

Signed-off-by: itsainii <[email protected]>
  • Loading branch information
itsainii authored Dec 17, 2024
1 parent 3bb3bf5 commit 3b53bd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions docling/datamodel/pipeline_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions docling/models/easyocr_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def __init__(
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,
)
Expand Down

0 comments on commit 3b53bd3

Please sign in to comment.