Spaces:
Running
Running
Zekun Wu
commited on
Commit
·
db6a6b2
1
Parent(s):
fe70a62
update
Browse files- pages/1_Injection.py +0 -6
pages/1_Injection.py
CHANGED
@@ -5,7 +5,6 @@ from util.injection import process_scores_multiple
|
|
5 |
from util.model import AzureAgent, GPTAgent
|
6 |
import os
|
7 |
|
8 |
-
# Set up the Streamlit interface
|
9 |
st.title('Result Generation')
|
10 |
|
11 |
def check_password():
|
@@ -73,10 +72,6 @@ else:
|
|
73 |
|
74 |
if df is not None:
|
75 |
|
76 |
-
# categories = ["HR", "DESIGNER", "INFORMATION-TECHNOLOGY", "TEACHER", "ADVOCATE", "BUSINESS-DEVELOPMENT",
|
77 |
-
# "HEALTHCARE", "FITNESS", "AGRICULTURE", "BPO", "SALES", "CONSULTANT", "DIGITAL-MEDIA",
|
78 |
-
# "AUTOMOBILE", "CHEF", "FINANCE", "APPAREL", "ENGINEERING", "ACCOUNTANT", "CONSTRUCTION",
|
79 |
-
# "PUBLIC-RELATIONS", "BANKING", "ARTS", "AVIATION"]
|
80 |
categories = list(df["Occupation"].unique())
|
81 |
|
82 |
st.session_state.occupation = st.selectbox("Occupation", options=categories, index=categories.index(st.session_state.occupation) if st.session_state.occupation in categories else 0)
|
@@ -104,7 +99,6 @@ else:
|
|
104 |
agent = GPTAgent(st.session_state.api_key, st.session_state.endpoint_url,
|
105 |
st.session_state.deployment_name, api_version)
|
106 |
|
107 |
-
# Process data and display results
|
108 |
with st.spinner('Processing data...'):
|
109 |
parameters = {"temperature": st.session_state.temperature, "max_tokens": st.session_state.max_tokens}
|
110 |
preprocessed_df = process_scores_multiple(df, st.session_state.num_run, parameters, st.session_state.privilege_label,st.session_state.protect_label, agent, st.session_state.group_name,st.session_state.occupation)#,st.session_state.charateristics)
|
|
|
5 |
from util.model import AzureAgent, GPTAgent
|
6 |
import os
|
7 |
|
|
|
8 |
st.title('Result Generation')
|
9 |
|
10 |
def check_password():
|
|
|
72 |
|
73 |
if df is not None:
|
74 |
|
|
|
|
|
|
|
|
|
75 |
categories = list(df["Occupation"].unique())
|
76 |
|
77 |
st.session_state.occupation = st.selectbox("Occupation", options=categories, index=categories.index(st.session_state.occupation) if st.session_state.occupation in categories else 0)
|
|
|
99 |
agent = GPTAgent(st.session_state.api_key, st.session_state.endpoint_url,
|
100 |
st.session_state.deployment_name, api_version)
|
101 |
|
|
|
102 |
with st.spinner('Processing data...'):
|
103 |
parameters = {"temperature": st.session_state.temperature, "max_tokens": st.session_state.max_tokens}
|
104 |
preprocessed_df = process_scores_multiple(df, st.session_state.num_run, parameters, st.session_state.privilege_label,st.session_state.protect_label, agent, st.session_state.group_name,st.session_state.occupation)#,st.session_state.charateristics)
|