recognized+space
This commit is contained in:
parent
344d96cf72
commit
8ebe5f82fc
|
@ -25,7 +25,7 @@ async def messages_routing(msg, state):
|
||||||
logger.debug(msg)
|
logger.debug(msg)
|
||||||
if reply_msg:
|
if reply_msg:
|
||||||
reply_chat_id = reply_msg.get("chat", {}).get("id")
|
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(
|
await telegram_api(
|
||||||
"sendMessage",
|
"sendMessage",
|
||||||
chat_id=reply_chat_id,
|
chat_id=reply_chat_id,
|
||||||
|
|
|
@ -15,7 +15,8 @@ def ocr_recognize(file_path):
|
||||||
[_coords, ocr_text, ocr_accuracy] = result
|
[_coords, ocr_text, ocr_accuracy] = result
|
||||||
logger.debug("OCR Result: %s", ocr_text)
|
logger.debug("OCR Result: %s", ocr_text)
|
||||||
if ocr_accuracy.item() > 0.5:
|
if ocr_accuracy.item() > 0.5:
|
||||||
sum_text += ocr_text
|
sum_text += " " + ocr_text
|
||||||
|
|
||||||
|
|
||||||
logger.debug(f'Recognized Text: {sum_text}')
|
logger.debug(f'Recognized Text: {sum_text}')
|
||||||
return sum_text
|
return sum_text
|
Loading…
Reference in New Issue
Block a user