Update README.md
Browse files
README.md
CHANGED
@@ -54,11 +54,16 @@ Use the code below to get started with the model.
|
|
54 |
|
55 |
```
|
56 |
from transformers import AutoModelForTokenClassification, AutoTokenizer
|
|
|
57 |
|
58 |
model = AutoModelForTokenClassification.from_pretrained("rv2307/electra-small-ner")
|
59 |
tokenizer = AutoTokenizer.from_pretrained("rv2307/electra-small-ner")
|
60 |
|
61 |
-
nlp = pipeline("ner",
|
|
|
|
|
|
|
|
|
62 |
```
|
63 |
|
64 |
## Training Details
|
|
|
54 |
|
55 |
```
|
56 |
from transformers import AutoModelForTokenClassification, AutoTokenizer
|
57 |
+
from transformers import pipeline
|
58 |
|
59 |
model = AutoModelForTokenClassification.from_pretrained("rv2307/electra-small-ner")
|
60 |
tokenizer = AutoTokenizer.from_pretrained("rv2307/electra-small-ner")
|
61 |
|
62 |
+
nlp = pipeline("ner",
|
63 |
+
model=model,
|
64 |
+
tokenizer=tokenizer,device="cpu",
|
65 |
+
aggregation_strategy = "max")
|
66 |
+
|
67 |
```
|
68 |
|
69 |
## Training Details
|