Spaces:
Running
Running
Zekun Wu
commited on
Commit
·
28e0c43
1
Parent(s):
5ae5e07
update
Browse files- pages/1_Injection.py +2 -2
pages/1_Injection.py
CHANGED
@@ -27,7 +27,7 @@ def initialize_state():
|
|
27 |
keys = ["model_submitted", "api_key", "endpoint_url", "deployment_name", "temperature", "max_tokens",
|
28 |
"data_processed", "group_name", "occupation", "privilege_label", "protect_label", "num_run",
|
29 |
"uploaded_file", "additional_charateristics"]
|
30 |
-
defaults = [False, "", "https://safeguard-monitor.openai.azure.com/", "gpt35-1106", 0.
|
31 |
"Programmer", "Male", "Female", 1, None, None]
|
32 |
for key, default in zip(keys, defaults):
|
33 |
if key not in st.session_state:
|
@@ -48,7 +48,7 @@ else:
|
|
48 |
st.session_state.endpoint_url = st.sidebar.text_input("Endpoint URL", value=st.session_state.endpoint_url)
|
49 |
st.session_state.deployment_name = st.sidebar.text_input("Model Name", value=st.session_state.deployment_name)
|
50 |
api_version = '2024-02-15-preview' if model_type == 'GPTAgent' else ''
|
51 |
-
st.session_state.temperature = st.sidebar.slider("Temperature", 0.0, 1.0, st.session_state.temperature, 0.
|
52 |
st.session_state.max_tokens = st.sidebar.number_input("Max Tokens", 1, 1000, st.session_state.max_tokens)
|
53 |
|
54 |
if st.sidebar.button("Reset Model Info"):
|
|
|
27 |
keys = ["model_submitted", "api_key", "endpoint_url", "deployment_name", "temperature", "max_tokens",
|
28 |
"data_processed", "group_name", "occupation", "privilege_label", "protect_label", "num_run",
|
29 |
"uploaded_file", "additional_charateristics"]
|
30 |
+
defaults = [False, "", "https://safeguard-monitor.openai.azure.com/", "gpt35-1106", 0.0, 150, False, "Gender",
|
31 |
"Programmer", "Male", "Female", 1, None, None]
|
32 |
for key, default in zip(keys, defaults):
|
33 |
if key not in st.session_state:
|
|
|
48 |
st.session_state.endpoint_url = st.sidebar.text_input("Endpoint URL", value=st.session_state.endpoint_url)
|
49 |
st.session_state.deployment_name = st.sidebar.text_input("Model Name", value=st.session_state.deployment_name)
|
50 |
api_version = '2024-02-15-preview' if model_type == 'GPTAgent' else ''
|
51 |
+
st.session_state.temperature = st.sidebar.slider("Temperature", 0.0, 1.0, st.session_state.temperature, 0.01)
|
52 |
st.session_state.max_tokens = st.sidebar.number_input("Max Tokens", 1, 1000, st.session_state.max_tokens)
|
53 |
|
54 |
if st.sidebar.button("Reset Model Info"):
|