tesemnikov-av
commited on
Commit
•
29d4f12
1
Parent(s):
eaae195
Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,24 @@
|
|
1 |
---
|
2 |
-
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
widget:
|
3 |
+
- text: "Ну ты и придурок!!"
|
4 |
---
|
5 |
+
|
6 |
+
NER Toxic models
|
7 |
+
|
8 |
+
Fine-tuning [cointegrated/rubert-tiny-toxicity](https://huggingface.co/cointegrated/rubert-tiny-toxicity) model on sentences from [toxic_dataset_ner](https://huggingface.co/datasets/tesemnikov-av/toxic_dataset_ner)
|
9 |
+
|
10 |
+
language: RU
|
11 |
+
|
12 |
+
```python
|
13 |
+
|
14 |
+
from transformers import pipeline
|
15 |
+
pipe = pipeline(model=model, tokenizer=tokenizer, task='ner', aggregation_strategy='average')
|
16 |
+
|
17 |
+
model = AutoModelForTokenClassification.from_pretrained('tesemnikov-av/rubert-ner-toxicity')
|
18 |
+
|
19 |
+
text = "Ёб твою мать"
|
20 |
+
|
21 |
+
print(text)
|
22 |
+
print(pipe(text))
|
23 |
+
|
24 |
+
```
|