asofter commited on
Commit
8950a27
1 Parent(s): 26c618b

* choose recognizers

Browse files
Files changed (2) hide show
  1. prompt.py +2 -2
  2. requirements.txt +1 -0
prompt.py CHANGED
@@ -19,7 +19,7 @@ from llm_guard.input_scanners import (
19
  Toxicity,
20
  )
21
  from llm_guard.input_scanners.anonymize import default_entity_types
22
- from llm_guard.input_scanners.anonymize_helpers.analyzer import allowed_recognizers
23
  from llm_guard.vault import Vault
24
 
25
  logger = logging.getLogger("llm-guard-playground")
@@ -103,7 +103,7 @@ def init_settings() -> (List, Dict):
103
  )
104
  st_anon_recognizer = st.selectbox(
105
  "Recognizer",
106
- allowed_recognizers,
107
  index=1,
108
  )
109
 
 
19
  Toxicity,
20
  )
21
  from llm_guard.input_scanners.anonymize import default_entity_types
22
+ from llm_guard.input_scanners.anonymize_helpers.analyzer import RECOGNIZER_SPACY_EN_PII_DISTILBERT, RECOGNIZER_SPACY_EN_PII_FAST
23
  from llm_guard.vault import Vault
24
 
25
  logger = logging.getLogger("llm-guard-playground")
 
103
  )
104
  st_anon_recognizer = st.selectbox(
105
  "Recognizer",
106
+ [RECOGNIZER_SPACY_EN_PII_DISTILBERT, RECOGNIZER_SPACY_EN_PII_FAST],
107
  index=1,
108
  )
109
 
requirements.txt CHANGED
@@ -3,3 +3,4 @@ llm-guard==0.3.0
3
  pandas==2.1.0
4
  streamlit==1.27.2
5
  streamlit-tags==1.2.8
 
 
3
  pandas==2.1.0
4
  streamlit==1.27.2
5
  streamlit-tags==1.2.8
6
+ https://huggingface.co/beki/en_spacy_pii_fast/resolve/main/en_spacy_pii_fast-any-py3-none-any.whl