Commit
·
806442c
1
Parent(s):
1a990fb
Update README.md
Browse files
README.md
CHANGED
@@ -79,14 +79,10 @@ The **roberta-base-ca-v2-cased-ner** is a Named Entity Recognition (NER) model f
|
|
79 |
Here is how to use this model in PyTorch:
|
80 |
|
81 |
```python
|
82 |
-
from transformers import AutoTokenizer, AutoModelForTokenClassification
|
83 |
from transformers import pipeline
|
84 |
from pprint import pprint
|
85 |
|
86 |
-
|
87 |
-
model = AutoModelForTokenClassification.from_pretrained("projecte-aina/roberta-base-ca-v2-cased-ner")
|
88 |
-
|
89 |
-
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
90 |
example = "Em dic Lluïsa i visc a Santa Maria del Camí."
|
91 |
|
92 |
ner_results = nlp(example)
|
|
|
79 |
Here is how to use this model in PyTorch:
|
80 |
|
81 |
```python
|
|
|
82 |
from transformers import pipeline
|
83 |
from pprint import pprint
|
84 |
|
85 |
+
nlp = pipeline("ner", model="projecte-aina/roberta-base-ca-v2-cased-ner")
|
|
|
|
|
|
|
86 |
example = "Em dic Lluïsa i visc a Santa Maria del Camí."
|
87 |
|
88 |
ner_results = nlp(example)
|