Views
No views yet

## run the prediction
txt = YOUR_TEXT
classifier = pipeline("ner", model=model, tokenizer=tokenizer, aggregation_strategy='simple')
entities = classifier(txt)
## display in a fancy way
dict_ents = {
'text': txt,
'ents': [{'start': ent['start'], 'end': ent['end'], 'label': ent['entity_group']} for ent in entities],
'title': None
}
displacy.render(dict_ents, manual=True, style="ent")