From 8ebe5f82fcb951adaf39a147202698c8d8015c9d Mon Sep 17 00:00:00 2001 From: Untone Date: Sun, 29 Sep 2024 08:12:05 +0300 Subject: [PATCH] recognized+space --- handlers/messages_routing.py | 2 +- nlp/ocr.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index 118b626..6755c29 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -25,7 +25,7 @@ async def messages_routing(msg, state): logger.debug(msg) if reply_msg: reply_chat_id = reply_msg.get("chat", {}).get("id") - if reply_chat_id != FEEDBACK_CHAT_ID: + if reply_chat_id != FEEDBACK_CHAT_ID.replace('-', '-100'): await telegram_api( "sendMessage", chat_id=reply_chat_id, diff --git a/nlp/ocr.py b/nlp/ocr.py index d66b2e1..435db3d 100644 --- a/nlp/ocr.py +++ b/nlp/ocr.py @@ -15,7 +15,8 @@ def ocr_recognize(file_path): [_coords, ocr_text, ocr_accuracy] = result logger.debug("OCR Result: %s", ocr_text) if ocr_accuracy.item() > 0.5: - sum_text += ocr_text + sum_text += " " + ocr_text + logger.debug(f'Recognized Text: {sum_text}') return sum_text \ No newline at end of file