presidio commited on
Commit
83ad88f
1 Parent(s): 7be225d

Update presidio_streamlit.py

Browse files
Files changed (1) hide show
  1. presidio_streamlit.py +1 -4
presidio_streamlit.py CHANGED
@@ -35,15 +35,12 @@ def analyzer_engine(model_path: str):
35
 
36
  # Set up NLP Engine according to the model of choice
37
  if model_path == "en_core_web_lg":
38
- if not spacy.util.is_package("en_core_web_lg"):
39
- spacy.cli.download("en_core_web_lg")
40
  nlp_configuration = {
41
  "nlp_engine_name": "spacy",
42
  "models": [{"lang_code": "en", "model_name": "en_core_web_lg"}],
43
  }
44
  else:
45
- if not spacy.util.is_package("en_core_web_sm"):
46
- spacy.cli.download("en_core_web_sm")
47
  # Using a small spaCy model + a HF NER model
48
  transformers_recognizer = TransformersRecognizer(model_path=model_path)
49
 
 
35
 
36
  # Set up NLP Engine according to the model of choice
37
  if model_path == "en_core_web_lg":
38
+
 
39
  nlp_configuration = {
40
  "nlp_engine_name": "spacy",
41
  "models": [{"lang_code": "en", "model_name": "en_core_web_lg"}],
42
  }
43
  else:
 
 
44
  # Using a small spaCy model + a HF NER model
45
  transformers_recognizer = TransformersRecognizer(model_path=model_path)
46