* upgrade version
Browse files- output.py +3 -2
- prompt.py +3 -2
- requirements.txt +3 -3
output.py
CHANGED
@@ -5,6 +5,7 @@ from typing import Dict, List
|
|
5 |
|
6 |
import streamlit as st
|
7 |
from llm_guard.input_scanners.anonymize import default_entity_types
|
|
|
8 |
from llm_guard.output_scanners import get_scanner_by_name
|
9 |
from llm_guard.output_scanners.bias import MatchType as BiasMatchType
|
10 |
from llm_guard.output_scanners.deanonymize import MatchingStrategy as DeanonymizeMatchingStrategy
|
@@ -170,8 +171,8 @@ def init_settings() -> (List, Dict):
|
|
170 |
with st_cd_expander:
|
171 |
st_cd_languages = st.multiselect(
|
172 |
"Programming languages",
|
173 |
-
options=
|
174 |
-
default=["
|
175 |
)
|
176 |
|
177 |
st_cd_is_blocked = st.checkbox("Is blocked", value=False, key="cd_is_blocked")
|
|
|
5 |
|
6 |
import streamlit as st
|
7 |
from llm_guard.input_scanners.anonymize import default_entity_types
|
8 |
+
from llm_guard.input_scanners.code import SUPPORTED_LANGUAGES as SUPPORTED_CODE_LANGUAGES
|
9 |
from llm_guard.output_scanners import get_scanner_by_name
|
10 |
from llm_guard.output_scanners.bias import MatchType as BiasMatchType
|
11 |
from llm_guard.output_scanners.deanonymize import MatchingStrategy as DeanonymizeMatchingStrategy
|
|
|
171 |
with st_cd_expander:
|
172 |
st_cd_languages = st.multiselect(
|
173 |
"Programming languages",
|
174 |
+
options=SUPPORTED_CODE_LANGUAGES,
|
175 |
+
default=["Python"],
|
176 |
)
|
177 |
|
178 |
st_cd_is_blocked = st.checkbox("Is blocked", value=False, key="cd_is_blocked")
|
prompt.py
CHANGED
@@ -6,6 +6,7 @@ from typing import Dict, List
|
|
6 |
import streamlit as st
|
7 |
from llm_guard.input_scanners import get_scanner_by_name
|
8 |
from llm_guard.input_scanners.anonymize import default_entity_types
|
|
|
9 |
from llm_guard.input_scanners.language import MatchType as LanguageMatchType
|
10 |
from llm_guard.input_scanners.prompt_injection import MatchType as PromptInjectionMatchType
|
11 |
from llm_guard.input_scanners.toxicity import MatchType as ToxicityMatchType
|
@@ -203,8 +204,8 @@ def init_settings() -> (List, Dict):
|
|
203 |
with st_cd_expander:
|
204 |
st_cd_languages = st.multiselect(
|
205 |
"Programming languages",
|
206 |
-
|
207 |
-
default=["
|
208 |
)
|
209 |
|
210 |
st_cd_is_blocked = st.checkbox("Is blocked", value=False, key="code_is_blocked")
|
|
|
6 |
import streamlit as st
|
7 |
from llm_guard.input_scanners import get_scanner_by_name
|
8 |
from llm_guard.input_scanners.anonymize import default_entity_types
|
9 |
+
from llm_guard.input_scanners.code import SUPPORTED_LANGUAGES as SUPPORTED_CODE_LANGUAGES
|
10 |
from llm_guard.input_scanners.language import MatchType as LanguageMatchType
|
11 |
from llm_guard.input_scanners.prompt_injection import MatchType as PromptInjectionMatchType
|
12 |
from llm_guard.input_scanners.toxicity import MatchType as ToxicityMatchType
|
|
|
204 |
with st_cd_expander:
|
205 |
st_cd_languages = st.multiselect(
|
206 |
"Programming languages",
|
207 |
+
SUPPORTED_CODE_LANGUAGES,
|
208 |
+
default=["Python"],
|
209 |
)
|
210 |
|
211 |
st_cd_is_blocked = st.checkbox("Is blocked", value=False, key="code_is_blocked")
|
requirements.txt
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
llm-guard==0.3.
|
2 |
-
llm-guard[onnxruntime]==0.3.
|
3 |
pandas==2.2.0
|
4 |
-
streamlit==1.
|
5 |
streamlit-tags==1.2.8
|
|
|
1 |
+
llm-guard==0.3.9
|
2 |
+
llm-guard[onnxruntime]==0.3.9
|
3 |
pandas==2.2.0
|
4 |
+
streamlit==1.31.0
|
5 |
streamlit-tags==1.2.8
|