Update README.md
Browse files
README.md
CHANGED
@@ -26,8 +26,13 @@ in medical radiology reports.
|
|
26 |
```python
|
27 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
28 |
|
|
|
|
|
29 |
tokenizer = AutoTokenizer.from_pretrained("Angelakeke/RaTE-NER-Deberta")
|
30 |
-
model = AutoModelForTokenClassification.from_pretrained("Angelakeke/RaTE-NER-Deberta"
|
|
|
|
|
|
|
31 |
```
|
32 |
|
33 |
## Author
|
|
|
26 |
```python
|
27 |
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
28 |
|
29 |
+
ner_labels = ['B-ABNORMALITY', 'I-ABNORMALITY', 'B-NON-ABNORMALITY', 'I-NON-ABNORMALITY', 'B-DISEASE', 'I-DISEASE', 'B-NON-DISEASE', 'I-NON-DISEASE', 'B-ANATOMY', 'I-ANATOMY', 'O']
|
30 |
+
|
31 |
tokenizer = AutoTokenizer.from_pretrained("Angelakeke/RaTE-NER-Deberta")
|
32 |
+
model = AutoModelForTokenClassification.from_pretrained("Angelakeke/RaTE-NER-Deberta",
|
33 |
+
num_labels=len(ner_labels),
|
34 |
+
ignore_mismatched_sizes=True,
|
35 |
+
)
|
36 |
```
|
37 |
|
38 |
## Author
|