average-stabw

This commit is contained in:
2024-09-27 13:39:40 +03:00
parent 773a01cdb1
commit c9728e14a7
2 changed files with 4 additions and 2 deletions

View File

@@ -92,7 +92,7 @@ async def messages_routing(msg, state):
except Exception:
pass
else:
toxic_score = detector(text)
toxic_score = detector(normalize(text))
toxic_perc = math.floor(toxic_score * 100)
await redis.set(f"toxic:{cid}", mid)
await redis.set(f"toxic:{cid}:{uid}:{mid}", toxic_perc, ex=60 * 60 * 24 * 3)