From 77d80ad34c00be97a47f55a534b62cd8b43159bf Mon Sep 17 00:00:00 2001 From: Phong Nguyen Date: Wed, 24 Jan 2024 12:13:21 +0700 Subject: [PATCH] download spacy model to support all models --- app/entity_extractor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/entity_extractor.py b/app/entity_extractor.py index e0e7a4e..6831282 100644 --- a/app/entity_extractor.py +++ b/app/entity_extractor.py @@ -89,6 +89,7 @@ def get_extractor() -> SpacyExtractor: f"Loading spacy model {settings.nlp_spacy_model}. If the model is not already" " downloaded, this may take a while." ) + spacy.cli.download(settings.nlp_spacy_model) nlp = spacy.load(settings.nlp_spacy_model) log.info(f"Loaded spacy model {settings.nlp_spacy_model}.")