File size: 855 Bytes
bdeaf68 29d4f12 bdeaf68 29d4f12 c21271f 29d4f12 07d924f 29d4f12 a4b60d0 29d4f12 07d924f 29d4f12 07d924f 29d4f12 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
---
widget:
- text: "Ну ты и придурок!!"
---
NER Toxic models
Fine-tuning [cointegrated/rubert-tiny-toxicity](https://huggingface.co/cointegrated/rubert-tiny-toxicity) model on data from [toxic_dataset_ner](https://huggingface.co/datasets/tesemnikov-av/toxic_dataset_ner)
language: RU
```python
!pip install transformers > /dev/null
from transformers import (
AutoModelForTokenClassification,
AutoTokenizer,
pipeline
)
model = AutoModelForTokenClassification.from_pretrained('tesemnikov-av/rubert-ner-toxicity')
tokenizer = AutoTokenizer.from_pretrained('tesemnikov-av/rubert-ner-toxicity')
pipe = pipeline(model=model, tokenizer=tokenizer, task='ner', aggregation_strategy='average')
text = "Они охриневшие там все придурки!!"
print(text)
print(pipe(text))
```
|