toxic-debug2
This commit is contained in:
parent
0a21993c5b
commit
21a366abe1
|
@ -50,9 +50,10 @@ async def messages_routing(msg, state):
|
|||
msg_toxic_key = f"toxic:{cid}:{uid}:{scoring_msg_id}"
|
||||
logger.debug('msg_toxic_key: ', msg_toxic_key)
|
||||
one_score = await redis.get(msg_toxic_key)
|
||||
one_score = int(one_score[0])
|
||||
logger.debug('one_score: ', one_score)
|
||||
emoji = '😳' if toxic_score > 90 else '😟' if toxic_score > 80 else '😏' if toxic_score > 60 else '🙂' if toxic_score > 20 else '😇'
|
||||
text = f"{int(one_score or 0)}% токсичности\nСредняя токсичность сообщений: {toxic_score}% {emoji}"
|
||||
text = f"{one_score}% токсичности\nСредняя токсичность сообщений: {toxic_score}% {emoji}"
|
||||
if text:
|
||||
await telegram_api(
|
||||
"sendMessage",
|
||||
|
|
Loading…
Reference in New Issue
Block a user