20 lines
383 B
Python
20 lines
383 B
Python
from app.ml.model_manager import model_manager
|
|
from app.services.text_moderation_service import TextModerationService
|
|
|
|
model_manager.initialize()
|
|
|
|
service = TextModerationService()
|
|
|
|
texts = [
|
|
"Привет",
|
|
"Спасибо",
|
|
"Ты идиот",
|
|
"Хорошего дня"
|
|
]
|
|
|
|
for text in texts:
|
|
result = service.moderate(text)
|
|
|
|
print("=" * 50)
|
|
print(text)
|
|
print(result) |