Text Classification
Transformers
Safetensors
Russian
English
roberta
pytorch_lightning
text-embeddings-inference
Instructions to use grafnatt/ru-en-toxicity-classifier-rosberta with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use grafnatt/ru-en-toxicity-classifier-rosberta with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="grafnatt/ru-en-toxicity-classifier-rosberta")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("grafnatt/ru-en-toxicity-classifier-rosberta") model = AutoModelForSequenceClassification.from_pretrained("grafnatt/ru-en-toxicity-classifier-rosberta", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Toxic and Aggressive Language Classifier (ru-en-RoSBERTa)
Модель предназначена для классификации токсичных, грубых и агрессивных сообщений на русском и английском языках. Обучена на базе предобученной модели ai-forever/ru-en-RoSBERTa с использованием библиотеки PyTorch Lightning.
Результаты тестирования
Модель показала выдающиеся результаты на тестовой выборке:
- Accuracy: 0.9999
- Precision: 0.9998
- Recall: 1.0000
- F1-Score: 0.9999
- MCC: 0.9998
- ROC AUC: 1.0000
Пример использования через pipeline
from transformers import pipeline
classifier = pipeline("text-classification", model="grafnatt/ru-en-toxicity-classifier-rosberta")
result = classifier("Вы что, совсем тупой? Я же уже объяснял!")
print(result)
# [{'label': 'LABEL_1', 'score': 0.7924}]
- Downloads last month
- 23