To fix the error, install the SpaCy model with this command:
bash Copy Edit python -m spacy download en_core_web_sm Then, update your code to:
python Copy Edit import spacy nlp = spacy.load("en_core_web_sm") This should resolve the issue!