added image ai-moderation

This commit is contained in:
SlimusMinus
2026-07-28 01:10:11 +03:00
parent 1132a774af
commit d376a7417a
34 changed files with 8302 additions and 34 deletions

View File

@@ -1,20 +1,20 @@
from app.ml.model_manager import model_manager
from app.services.text_moderation_service import TextModerationService
from app.container import profanity_detector
model_manager.initialize()
service = TextModerationService()
texts = [
"Привет",
"Спасибо",
tests = [
"ЗАлУпа",
"Ты идиот",
"Это идиоты",
"Хорошего дня"
]
for text in texts:
result = service.moderate(text)
print("=" * 50)
print(text)
print(result)
for text in tests:
result = profanity_detector.detect(text)
print(
text,
"=>",
result
)