Zekun Wu commited on
Commit
c050d3e
1 Parent(s): 966b9f4
Files changed (1) hide show
  1. pages/1_Injection.py +7 -14
pages/1_Injection.py CHANGED
@@ -64,29 +64,22 @@ else:
64
  file_options = st.radio("Choose file source:", ["Upload", "Example"])
65
  if file_options == "Example":
66
  #df = pd.read_csv("prompt_test.csv")
67
-
 
 
 
 
 
 
68
  categories = [
69
  "HR", "DESIGNER", "INFORMATION-TECHNOLOGY", "TEACHER", "ADVOCATE", "BUSINESS-DEVELOPMENT",
70
  "HEALTHCARE", "FITNESS", "AGRICULTURE", "BPO", "SALES", "CONSULTANT", "DIGITAL-MEDIA",
71
  "AUTOMOBILE", "CHEF", "FINANCE", "APPAREL", "ENGINEERING", "ACCOUNTANT", "CONSTRUCTION",
72
  "PUBLIC-RELATIONS", "BANKING", "ARTS", "AVIATION"
73
  ]
74
-
75
  st.session_state.occupation = st.selectbox("Occupation", options=categories, index=categories.index(
76
  st.session_state.occupation) if st.session_state.occupation in categories else 0)
77
-
78
- df = pd.read_csv("resume.csv")
79
  df = df[df['Occupation'] == st.session_state.occupation]
80
-
81
-
82
-
83
- else:
84
- st.session_state.uploaded_file = st.file_uploader("Choose a file")
85
- if st.session_state.uploaded_file is not None:
86
- data = StringIO(st.session_state.uploaded_file.getvalue().decode("utf-8"))
87
- df = pd.read_csv(data)
88
- if df is not None:
89
-
90
  st.write('Data:', df)
91
 
92
  # Button to add a new row
 
64
  file_options = st.radio("Choose file source:", ["Upload", "Example"])
65
  if file_options == "Example":
66
  #df = pd.read_csv("prompt_test.csv")
67
+ df = pd.read_csv("resume.csv")
68
+ else:
69
+ st.session_state.uploaded_file = st.file_uploader("Choose a file")
70
+ if st.session_state.uploaded_file is not None:
71
+ data = StringIO(st.session_state.uploaded_file.getvalue().decode("utf-8"))
72
+ df = pd.read_csv(data)
73
+ if df is not None:
74
  categories = [
75
  "HR", "DESIGNER", "INFORMATION-TECHNOLOGY", "TEACHER", "ADVOCATE", "BUSINESS-DEVELOPMENT",
76
  "HEALTHCARE", "FITNESS", "AGRICULTURE", "BPO", "SALES", "CONSULTANT", "DIGITAL-MEDIA",
77
  "AUTOMOBILE", "CHEF", "FINANCE", "APPAREL", "ENGINEERING", "ACCOUNTANT", "CONSTRUCTION",
78
  "PUBLIC-RELATIONS", "BANKING", "ARTS", "AVIATION"
79
  ]
 
80
  st.session_state.occupation = st.selectbox("Occupation", options=categories, index=categories.index(
81
  st.session_state.occupation) if st.session_state.occupation in categories else 0)
 
 
82
  df = df[df['Occupation'] == st.session_state.occupation]
 
 
 
 
 
 
 
 
 
 
83
  st.write('Data:', df)
84
 
85
  # Button to add a new row