Update app.py
Browse files
app.py
CHANGED
@@ -18,10 +18,10 @@ with st.sidebar:
|
|
18 |
This app accepts files in .pdf formats.
|
19 |
|
20 |
**How to Use**
|
21 |
-
Paste the job description first. Then, upload
|
22 |
|
23 |
**Usage Limits**
|
24 |
-
You can request results up to
|
25 |
|
26 |
**Subscription Management**
|
27 |
This demo app offers a one-day subscription, expiring after 24 hours. If you are interested in building your own AI Resume Analysis based on Keywords Web App, we invite you to explore our NLP Web App Store on our website. You can select your desired features, place your order, and we will deliver your custom app within five business days. If you wish to delete your Account with us, please contact us at [email protected]
|
@@ -40,19 +40,21 @@ with st.sidebar:
|
|
40 |
''')
|
41 |
|
42 |
|
|
|
|
|
43 |
|
44 |
st.subheader("Job Description", divider="red")
|
45 |
txt = st.text_area("Paste the job description and then press Ctrl + Enter", key="text 1")
|
46 |
job = pd.Series(txt, name="Text")
|
47 |
|
48 |
-
st.subheader("
|
49 |
if 'upload_count' not in st.session_state:
|
50 |
st.session_state['upload_count'] = 0
|
51 |
|
52 |
max_attempts = 3
|
53 |
if st.session_state['upload_count'] < max_attempts:
|
54 |
uploaded_files = st.file_uploader(
|
55 |
-
"Upload
|
56 |
)
|
57 |
if uploaded_files:
|
58 |
st.session_state['upload_count'] += 1
|
@@ -69,7 +71,7 @@ if st.session_state['upload_count'] < max_attempts:
|
|
69 |
entities = model.predict_entities(text_data, labels)
|
70 |
df = pd.DataFrame(entities)
|
71 |
|
72 |
-
|
73 |
fig = px.treemap(entities, path=[px.Constant("all"), 'text', 'label'],
|
74 |
values='score', color='label')
|
75 |
fig.update_layout(margin=dict(t=50, l=25, r=25, b=25))
|
@@ -81,15 +83,19 @@ if st.session_state['upload_count'] < max_attempts:
|
|
81 |
cosine_sim_matrix = cosine_similarity(tfidf_matrix)
|
82 |
cosine_sim_df = pd.DataFrame(cosine_sim_matrix)
|
83 |
|
84 |
-
|
85 |
fig = px.imshow(cosine_sim_df, text_auto=True,
|
86 |
labels=dict(x="Keyword similarity", y="Resumes", color="Productivity"),
|
87 |
x=['Resume 1', 'Jon Description'],
|
88 |
y=['Resume 1', 'Job Description'])
|
89 |
st.plotly_chart(fig, key="figure 2")
|
90 |
|
|
|
|
|
|
|
91 |
for i, similarity_score in enumerate(cosine_sim_matrix[0][1:]):
|
92 |
-
st.
|
|
|
93 |
st.info(
|
94 |
"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.")
|
95 |
else:
|
|
|
18 |
This app accepts files in .pdf formats.
|
19 |
|
20 |
**How to Use**
|
21 |
+
Paste the job description first. Then, upload the resume of each applicant to retrieve the results. At the bottom of the app, you could upload each applicant's resume to visualize their profile as a treemap chart as well as the results in a matrix heatmap.
|
22 |
|
23 |
**Usage Limits**
|
24 |
+
You can request results up to 20 times in total.
|
25 |
|
26 |
**Subscription Management**
|
27 |
This demo app offers a one-day subscription, expiring after 24 hours. If you are interested in building your own AI Resume Analysis based on Keywords Web App, we invite you to explore our NLP Web App Store on our website. You can select your desired features, place your order, and we will deliver your custom app within five business days. If you wish to delete your Account with us, please contact us at [email protected]
|
|
|
40 |
''')
|
41 |
|
42 |
|
43 |
+
st.subheader("AI Resume Analysis based on Keywords App")
|
44 |
+
st.divider()
|
45 |
|
46 |
st.subheader("Job Description", divider="red")
|
47 |
txt = st.text_area("Paste the job description and then press Ctrl + Enter", key="text 1")
|
48 |
job = pd.Series(txt, name="Text")
|
49 |
|
50 |
+
st.subheader("Applicant Profile 1", divider="green")
|
51 |
if 'upload_count' not in st.session_state:
|
52 |
st.session_state['upload_count'] = 0
|
53 |
|
54 |
max_attempts = 3
|
55 |
if st.session_state['upload_count'] < max_attempts:
|
56 |
uploaded_files = st.file_uploader(
|
57 |
+
"Upload Applicant's 1 resume", type="pdf", key="candidate 1"
|
58 |
)
|
59 |
if uploaded_files:
|
60 |
st.session_state['upload_count'] += 1
|
|
|
71 |
entities = model.predict_entities(text_data, labels)
|
72 |
df = pd.DataFrame(entities)
|
73 |
|
74 |
+
|
75 |
fig = px.treemap(entities, path=[px.Constant("all"), 'text', 'label'],
|
76 |
values='score', color='label')
|
77 |
fig.update_layout(margin=dict(t=50, l=25, r=25, b=25))
|
|
|
83 |
cosine_sim_matrix = cosine_similarity(tfidf_matrix)
|
84 |
cosine_sim_df = pd.DataFrame(cosine_sim_matrix)
|
85 |
|
86 |
+
|
87 |
fig = px.imshow(cosine_sim_df, text_auto=True,
|
88 |
labels=dict(x="Keyword similarity", y="Resumes", color="Productivity"),
|
89 |
x=['Resume 1', 'Jon Description'],
|
90 |
y=['Resume 1', 'Job Description'])
|
91 |
st.plotly_chart(fig, key="figure 2")
|
92 |
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
for i, similarity_score in enumerate(cosine_sim_matrix[0][1:]):
|
97 |
+
with st.popover("See result"):
|
98 |
+
st.write(f"Similarity of job description with Applicant's 1 resume based on keywords {i + 1}: {similarity_score:.2f}")
|
99 |
st.info(
|
100 |
"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.")
|
101 |
else:
|