recognized+space

This commit is contained in:
Untone 2024-09-29 08:12:05 +03:00
parent 344d96cf72
commit 8ebe5f82fc
2 changed files with 3 additions and 2 deletions

View File

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

View File

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