zayanomar5 commited on
Commit
a68368d
·
verified ·
1 Parent(s): 64cac72

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -49,7 +49,7 @@ def compare():
49
 
50
  for i, job_e in enumerate(job_embeddings):
51
  job_e_tensor = torch.from_numpy(job_e).unsqueeze(0)
52
- similarity_score = cosine_similarity(employee_embeddings_tensor, job_e_tensor, dim=1)
53
  similarity_scores.append({"job": jobs_skills[i], "similarity_score": similarity_score.item()})
54
 
55
  return jsonify(similarity_scores)
 
49
 
50
  for i, job_e in enumerate(job_embeddings):
51
  job_e_tensor = torch.from_numpy(job_e).unsqueeze(0)
52
+ similarity_score = cosine_similarity(employee_embeddings_tensor, job_e_tensor, dim=1)[0]
53
  similarity_scores.append({"job": jobs_skills[i], "similarity_score": similarity_score.item()})
54
 
55
  return jsonify(similarity_scores)