From 5d16c895ac71b8c94f3846c33e1d576581a75009 Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 28 Sep 2024 11:12:42 +0300 Subject: [PATCH] normalized-log-fix7 --- nlp/ocr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nlp/ocr.py b/nlp/ocr.py index 924ec24..3ab859f 100644 --- a/nlp/ocr.py +++ b/nlp/ocr.py @@ -11,6 +11,6 @@ def ocr_recognize(file_path): result = reader.readtext(file_path) # Extract the recognized text from the result - recognized_text = ' '.join([text for text, _, _ in result]) + recognized_text = ' '.join([text[0] for text, _, _ in result if isinstance(text, list) and text]) logger.debug(f'recognized_text: {recognized_text}') return recognized_text \ No newline at end of file