Update app.py
Browse files
app.py
CHANGED
@@ -33,11 +33,11 @@ for i in range(1, 51): # Looping for 50 applicants
|
|
33 |
st.write(text_data)
|
34 |
|
35 |
# Encode the job description and resume text separately
|
36 |
-
job_embedding = model.encode(job_desc
|
37 |
-
|
38 |
|
39 |
# Calculate the cosine similarity between the two embeddings
|
40 |
-
similarity_score = model.similarity(job_embedding,
|
41 |
|
42 |
with st.popover(f"See Result for Applicant {i}"):
|
43 |
st.write(f"Similarity between Applicant's resume and job description based on keywords: {similarity_score:.2f}")
|
|
|
33 |
st.write(text_data)
|
34 |
|
35 |
# Encode the job description and resume text separately
|
36 |
+
job_embedding = model.encode([job_desc])
|
37 |
+
resume_embedding = model.encode([text_data])
|
38 |
|
39 |
# Calculate the cosine similarity between the two embeddings
|
40 |
+
similarity_score = model.similarity(job_embedding, resume_embedding)[0][0]
|
41 |
|
42 |
with st.popover(f"See Result for Applicant {i}"):
|
43 |
st.write(f"Similarity between Applicant's resume and job description based on keywords: {similarity_score:.2f}")
|