zayanomar5 commited on
Commit
02113e3
·
verified ·
1 Parent(s): 5bfdaea

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -2
main.py CHANGED
@@ -73,7 +73,10 @@ def compare():
73
  max_similarity_index = similarities.index(max(similarities))
74
  max_similarity_job = jobs_skills[max_similarity_index]
75
 
76
- return jsonify({'job': max_similarity_job, 'similarity': max(similarities)})
 
 
 
77
 
78
  if __name__ == '__main__':
79
- app.run()
 
73
  max_similarity_index = similarities.index(max(similarities))
74
  max_similarity_job = jobs_skills[max_similarity_index]
75
 
76
+ # Return similarities for all jobs
77
+ similarities_dict = {job: similarity for job, similarity in zip(jobs_skills, similarities)}
78
+
79
+ return jsonify({'job': max_similarity_job, 'similarities': similarities_dict})
80
 
81
  if __name__ == '__main__':
82
+ app.run()