From 45b9ded57646d1bffa13d4241545e37c75594617 Mon Sep 17 00:00:00 2001 From: IoannisMaras Date: Thu, 5 Jun 2025 17:29:48 +0300 Subject: [PATCH] fix: initialize df_osd to avoid uninitialized variable error Signed-off-by: IoannisMaras --- docling/models/tesseract_ocr_cli_model.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docling/models/tesseract_ocr_cli_model.py b/docling/models/tesseract_ocr_cli_model.py index e6901045..75af0301 100644 --- a/docling/models/tesseract_ocr_cli_model.py +++ b/docling/models/tesseract_ocr_cli_model.py @@ -231,6 +231,7 @@ class TesseractOcrCliModel(BaseOcrModel): fname = image_file.name high_res_image.save(image_file) doc_orientation = 0 + df_osd=None try: df_osd = self._perform_osd(fname) doc_orientation = _parse_orientation(df_osd)