normalized-log-fix7

This commit is contained in:
Untone 2024-09-28 11:12:42 +03:00
parent 16bed092fc
commit 5d16c895ac

View File

@ -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