Views
No views yet
1import spacy
2from huggingface_hub import snapshot_download
3
4# Download the model
5model_path = snapshot_download(repo_id='thefishhh/spacy-ner-lean')
6
7# Load the model
8nlp = spacy.load(model_path)
9
10# Use the model
11doc = nlp('Your text here')
12for ent in doc.ents:
13 print(ent.text, ent.label_)