From f3d1e6ee8c95206b0db3a61a05b35fc537625a4e Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 26 Sep 2024 14:29:41 +0300 Subject: [PATCH] toxic-score-fix --- README.md | 1 + handlers/messages_routing.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8bd3de..4f877b4 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ - `BOT_TOKEN` - токен бота созданный с помощью @BotFather - `FEEDBACK_CHAT_ID` - айди чата для обратной связи + - `REDIS_URL` ### Локальная разработка diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index 8a1157b..85d75a2 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -32,7 +32,7 @@ async def messages_routing(msg, state): elif bool(text): mid = msg.get("message_id") - non_toxic_score, toxic_score = detector(text) + toxic_score = detector(text) logger.info(f'\ntext: {text}\ntoxic: {math.floor(toxic_score*100)}%') if toxic_score > 0.71: if toxic_score > 0.85: