Update README.md
Browse files
README.md
CHANGED
@@ -59,7 +59,7 @@ from transformers import pipeline
|
|
59 |
tokenizer = AutoTokenizer.from_pretrained("gunghio/xlm-roberta-base-finetuned-panx-ner")
|
60 |
model = AutoModelForTokenClassification.from_pretrained("gunghio/xlm-roberta-base-finetuned-panx-ner")
|
61 |
|
62 |
-
nlp = pipeline("ner", model=model, tokenizer=tokenizer)
|
63 |
example = "My name is Wolfgang and I live in Berlin"
|
64 |
|
65 |
ner_results = nlp(example)
|
|
|
59 |
tokenizer = AutoTokenizer.from_pretrained("gunghio/xlm-roberta-base-finetuned-panx-ner")
|
60 |
model = AutoModelForTokenClassification.from_pretrained("gunghio/xlm-roberta-base-finetuned-panx-ner")
|
61 |
|
62 |
+
nlp = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy="first")
|
63 |
example = "My name is Wolfgang and I live in Berlin"
|
64 |
|
65 |
ner_results = nlp(example)
|