nlpblogs commited on
Commit
e2b4eda
·
verified ·
1 Parent(s): 4e3c2bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -133,12 +133,9 @@ if st.session_state['upload_count'] < max_attempts:
133
  job_embedding = model.encode([job_desc])
134
  resume_embedding = model.encode([text_data])
135
  similarity_score = model.similarity(job_embedding, resume_embedding)[0][0]
136
- similarity_array = np.array([similarity_score])
137
  st.subheader("Similarity between Applicant's Profile and Job Description", divider = "orange")
138
- fig = px.imshow(similarity_array, text_auto=True,
139
- labels=dict(x="Keyword similarity", y="Resumes", color="Productivity"),
140
- x=['Resume', 'Jon Description'],
141
- y=['Resume', 'Job Description'])
142
  st.plotly_chart(fig, key="figure 2")
143
  else:
144
  st.warning(f"Maximum upload attempts has been reached ({max_attempts}).")
 
133
  job_embedding = model.encode([job_desc])
134
  resume_embedding = model.encode([text_data])
135
  similarity_score = model.similarity(job_embedding, resume_embedding)[0][0]
136
+
137
  st.subheader("Similarity between Applicant's Profile and Job Description", divider = "orange")
138
+ st.metric(label="Similarity Score", value=f"{similarity_score:.2f}")
 
 
 
139
  st.plotly_chart(fig, key="figure 2")
140
  else:
141
  st.warning(f"Maximum upload attempts has been reached ({max_attempts}).")