Spaces:
Running
Running
Zekun Wu
commited on
Commit
·
5ae5e07
1
Parent(s):
38fa9e3
update
Browse files- pages/1_Injection.py +1 -1
- util/injection.py +1 -1
pages/1_Injection.py
CHANGED
@@ -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"):
|
|
|
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.00)
|
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"):
|
util/injection.py
CHANGED
@@ -104,7 +104,7 @@ def process_scores_multiple(df, num_run, parameters, privilege_label, protect_la
|
|
104 |
|
105 |
for key, label in zip(['Privilege', 'Protect', 'Neutral'], [privilege_label, protect_label, False]):
|
106 |
prompt_temp = create_summary(row, group_name, label, occupation, additional_charateristics)
|
107 |
-
print(f"Run {run + 1} - Entry {index + 1} - {key}:\n{
|
108 |
print("=============================================================")
|
109 |
result = invoke_retry(prompt_temp, agent, parameters)
|
110 |
scores[key][index].append(result)
|
|
|
104 |
|
105 |
for key, label in zip(['Privilege', 'Protect', 'Neutral'], [privilege_label, protect_label, False]):
|
106 |
prompt_temp = create_summary(row, group_name, label, occupation, additional_charateristics)
|
107 |
+
print(f"Run {run + 1} - Entry {index + 1} - {key}:\n{additional_charateristics}")
|
108 |
print("=============================================================")
|
109 |
result = invoke_retry(prompt_temp, agent, parameters)
|
110 |
scores[key][index].append(result)
|