diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index f265522..6b089dd 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -3,6 +3,7 @@ from bot.config import FEEDBACK_CHAT_ID from nlp.toxicity import text2toxicity from nlp.replying import get_toxic_reply import logging +import math from handlers.handle_private import handle_private logger = logging.getLogger(__name__) @@ -31,6 +32,7 @@ async def messages_routing(msg, state): elif bool(text): toxic_score = text2toxicity(text) + logger.info(f'\ntext: {text}\ntoxic: {math.floor(toxic_score*100)}%') if toxic_score > 0.71: toxic_reply = get_toxic_reply(toxic_score) await telegram_api(