nlpblogs commited on
Commit
591c7c7
·
verified ·
1 Parent(s): 5b290a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -39,7 +39,7 @@ with st.sidebar:
39
 
40
  ''')
41
 
42
- st.subheader ("Candidate Profile 1", divider = "green")
43
 
44
  txt = st.text_area("Paste the job description and then press Ctrl + Enter", key = "text 1")
45
  job = pd.Series(txt, name="Text")
@@ -75,7 +75,7 @@ for uploaded_file in uploaded_files:
75
  df = pd.DataFrame(entities)
76
 
77
 
78
- st.subheader("Profile of candidate 1")
79
  fig1 = px.treemap(entities, path=[px.Constant("all"), 'text', 'label'],
80
  values='score', color='label')
81
  fig1.update_layout(margin = dict(t=50, l=25, r=25, b=25))
@@ -92,7 +92,7 @@ for uploaded_file in uploaded_files:
92
 
93
 
94
 
95
- st.subheader("Measuring similarity between keywords of candidate profile 1 and job description")
96
  fig2 = px.imshow(cosine_sim_df, text_auto=True, labels=dict(x="Keyword similarity", y="Resumes", color="Productivity"),
97
  x=['Resume 1', 'Jon Description'],
98
  y=['Resume 1', 'Job Description'])
@@ -112,7 +112,7 @@ if 'upload_count' in st.session_state and st.session_state['upload_count'] > 0:
112
 
113
 
114
 
115
- st.subheader ("Candidate Profile 1", divider = "green")
116
 
117
 
118
 
@@ -151,7 +151,7 @@ for uploaded_file in uploaded_files:
151
  fig3 = px.treemap(entities, path=[px.Constant("all"), 'text', 'label'],
152
  values='score', color='label')
153
  fig3.update_layout(margin = dict(t=50, l=25, r=25, b=25))
154
- st.plotly_chart(fig3, key = "figure 3")
155
 
156
 
157
 
@@ -168,12 +168,12 @@ for uploaded_file in uploaded_files:
168
  fig4 = px.imshow(cosine_sim_df, text_auto=True, labels=dict(x="Keyword similarity", y="Resumes", color="Productivity"),
169
  x=['Resume 1', 'Jon Description'],
170
  y=['Resume 1', 'Job Description'])
171
- st.plotly_chart(fig4, key = "figure 4")
172
 
173
 
174
  for i, similarity_score in enumerate(cosine_sim_matrix[0][1:]):
175
  st.write(f"Similarity of job description with candidate profile 1. {i + 1}: {similarity_score:.4f}")
176
- st.write("A score closer to 1 (0.80, 0.90) means higher similarity between candidate profile 1 and job description. A score closer to 0 (0.20, 0.30) means lower similarity between candidate profile 1 and job description.")
177
 
178
  else:
179
  st.warning(f"You have reached the maximum URL attempts ({max_attempts}).")
 
39
 
40
  ''')
41
 
42
+ st.subheader ("Candidate Profile 1", divider = "red")
43
 
44
  txt = st.text_area("Paste the job description and then press Ctrl + Enter", key = "text 1")
45
  job = pd.Series(txt, name="Text")
 
75
  df = pd.DataFrame(entities)
76
 
77
 
78
+ st.subheader("Profile of candidate 1", divider = "green")
79
  fig1 = px.treemap(entities, path=[px.Constant("all"), 'text', 'label'],
80
  values='score', color='label')
81
  fig1.update_layout(margin = dict(t=50, l=25, r=25, b=25))
 
92
 
93
 
94
 
95
+ st.subheader("Measuring similarity between keywords of candidate profile 1 and job description", divider = "green")
96
  fig2 = px.imshow(cosine_sim_df, text_auto=True, labels=dict(x="Keyword similarity", y="Resumes", color="Productivity"),
97
  x=['Resume 1', 'Jon Description'],
98
  y=['Resume 1', 'Job Description'])
 
112
 
113
 
114
 
115
+ st.subheader ("Candidate Profile 1", divider = "red")
116
 
117
 
118
 
 
151
  fig3 = px.treemap(entities, path=[px.Constant("all"), 'text', 'label'],
152
  values='score', color='label')
153
  fig3.update_layout(margin = dict(t=50, l=25, r=25, b=25))
154
+ st.plotly_chart(fig3, key = "chart 3")
155
 
156
 
157
 
 
168
  fig4 = px.imshow(cosine_sim_df, text_auto=True, labels=dict(x="Keyword similarity", y="Resumes", color="Productivity"),
169
  x=['Resume 1', 'Jon Description'],
170
  y=['Resume 1', 'Job Description'])
171
+ st.plotly_chart(fig4, key = "chart 4")
172
 
173
 
174
  for i, similarity_score in enumerate(cosine_sim_matrix[0][1:]):
175
  st.write(f"Similarity of job description with candidate profile 1. {i + 1}: {similarity_score:.4f}")
176
+ st.info("A score closer to 1 (0.80, 0.90) means higher similarity between candidate profile 1 and job description. A score closer to 0 (0.20, 0.30) means lower similarity between candidate profile 1 and job description.")
177
 
178
  else:
179
  st.warning(f"You have reached the maximum URL attempts ({max_attempts}).")