mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
add warning log for rec_font_path
This commit is contained in:
@@ -114,7 +114,7 @@ class RapidOcrOptions(OcrOptions):
|
||||
cls_model_path: Optional[str] = None # same default as rapidocr
|
||||
rec_model_path: Optional[str] = None # same default as rapidocr
|
||||
rec_keys_path: Optional[str] = None # same default as rapidocr
|
||||
rec_font_path: Optional[str] = None # Deprecated with new RapidOCR Version please use font_path instead
|
||||
rec_font_path: Optional[str] = None # Deprecated, please use font_path instead
|
||||
font_path: Optional[str] = None # same default as rapidocr
|
||||
|
||||
# Dictionary to overwrite or pass-through additional parameters
|
||||
|
||||
@@ -89,6 +89,10 @@ class RapidOcrModel(BaseOcrModel):
|
||||
"Rec.engine_type": backend_enum,
|
||||
}
|
||||
|
||||
if self.options.rec_font_path is not None:
|
||||
_log.warning(
|
||||
"The 'rec_font_path' option for RapidOCR is deprecated. Please use 'font_path' instead."
|
||||
)
|
||||
user_params = self.options.rapidocr_params
|
||||
if user_params:
|
||||
_log.debug("Overwriting RapidOCR params with user-provided values.")
|
||||
|
||||
Reference in New Issue
Block a user