chelscelis commited on
Commit
f9848af
1 Parent(s): e236812

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -15
app.py CHANGED
@@ -59,14 +59,23 @@ with tab2:
59
  st.divider()
60
  st.header('Output')
61
  resumeClf = pd.read_excel(uploadedResumeClf)
62
- resumeClf = classifyResumes(resumeClf)
63
- with st.expander('View Bar Chart'):
64
- barChart = createBarChart(resumeClf)
65
- st.altair_chart(barChart, use_container_width = True)
66
- currentClf = filterDataframeClf(resumeClf)
67
- st.dataframe(currentClf, use_container_width = True, hide_index = True)
68
- xlsxClf = convertDfToXlsx(currentClf)
69
- st.download_button(label='Save Current Output as XLSX', data = xlsxClf, file_name = 'Resumes_categorized.xlsx')
 
 
 
 
 
 
 
 
 
70
 
71
  with tab3:
72
  st.header('Input')
@@ -89,11 +98,20 @@ with tab3:
89
  st.header('Output')
90
  jobDescriptionRnk = uploadedJobDescriptionRnk.read().decode('utf-8')
91
  resumeRnk = pd.read_excel(uploadedResumeRnk)
92
- resumeRnk = rankResumes(jobDescriptionRnk, resumeRnk)
93
- with st.expander('View Job Description'):
94
- st.write(jobDescriptionRnk)
95
- currentRnk = filterDataframeRnk(resumeRnk)
96
- st.dataframe(currentRnk, use_container_width = True, hide_index = True)
97
- xlsxRnk = convertDfToXlsx(currentRnk)
98
- st.download_button(label='Save Current Output as XLSX', data = xlsxRnk, file_name = 'Resumes_ranked.xlsx')
 
 
 
 
 
 
 
 
 
99
 
 
59
  st.divider()
60
  st.header('Output')
61
  resumeClf = pd.read_excel(uploadedResumeClf)
62
+ if 'Resume' in resumeClf.columns:
63
+ resumeClf = classifyResumes(resumeClf)
64
+ with st.expander('View Bar Chart'):
65
+ barChart = createBarChart(resumeClf)
66
+ st.altair_chart(barChart, use_container_width = True)
67
+ currentClf = filterDataframeClf(resumeClf)
68
+ st.dataframe(currentClf, use_container_width = True, hide_index = True)
69
+ xlsxClf = convertDfToXlsx(currentClf)
70
+ st.download_button(label='Save Current Output as XLSX', data = xlsxClf, file_name = 'Resumes_categorized.xlsx')
71
+ else:
72
+ st.error("""
73
+ #### Oops! Something went wrong.
74
+
75
+ The **"Resume"** column is not found in the uploaded excel file.
76
+
77
+ Kindly make sure the column is present :)
78
+ """)
79
 
80
  with tab3:
81
  st.header('Input')
 
98
  st.header('Output')
99
  jobDescriptionRnk = uploadedJobDescriptionRnk.read().decode('utf-8')
100
  resumeRnk = pd.read_excel(uploadedResumeRnk)
101
+ if 'Resume' in resumeRnk.columns:
102
+ resumeRnk = rankResumes(jobDescriptionRnk, resumeRnk)
103
+ with st.expander('View Job Description'):
104
+ st.write(jobDescriptionRnk)
105
+ currentRnk = filterDataframeRnk(resumeRnk)
106
+ st.dataframe(currentRnk, use_container_width = True, hide_index = True)
107
+ xlsxRnk = convertDfToXlsx(currentRnk)
108
+ st.download_button(label='Save Current Output as XLSX', data = xlsxRnk, file_name = 'Resumes_ranked.xlsx')
109
+ else:
110
+ st.error("""
111
+ #### Oops! Something went wrong.
112
+
113
+ The **"Resume"** column is not found in the uploaded excel file.
114
+
115
+ Kindly make sure the column is present :)
116
+ """)
117