SonFox2920 commited on
Commit
d0d63f6
·
verified ·
1 Parent(s): 83aabef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -567,13 +567,21 @@ with tab1:
567
 
568
  try:
569
  response = get_gemini_response(prompt, cv_text)
570
- main_CV_score = round((response["nang_luc_chuyen_mon"]*0.4 + response["phu_hop_van_hoa"]*0.3 + response["kha_nang_hoc_hoi"]*0.2 + response["diem_cong_diem_tru"]*0.1), 2)
 
 
 
 
 
 
 
571
  uv = {
572
  'Tên ứng viên': name,
573
  'Năng lực chuyên môn': response["nang_luc_chuyen_mon"],
574
  'Phù hợp văn hóa': response["phu_hop_van_hoa"],
575
  'Khả năng học hỏi': response["kha_nang_hoc_hoi"],
576
- 'Điểm cộng & điểm trừ': response["diem_cong_diem_tru"],
 
577
  'Điểm tổng quát': main_CV_score,
578
  'Tóm tắt': response["tom_tat"]
579
  }
 
567
 
568
  try:
569
  response = get_gemini_response(prompt, cv_text)
570
+ # Thay đổi công thức tính điểm tổng thể
571
+ main_CV_score = round((response["nang_luc_chuyen_mon"]*0.4 +
572
+ response["phu_hop_van_hoa"]*0.3 +
573
+ response["kha_nang_hoc_hoi"]*0.2 +
574
+ (response["diem_cong"] - response["diem_tru"])*0.1), 2)
575
+
576
+ # Đảm bảo điểm không bị âm
577
+ main_CV_score = max(0, main_CV_score)
578
  uv = {
579
  'Tên ứng viên': name,
580
  'Năng lực chuyên môn': response["nang_luc_chuyen_mon"],
581
  'Phù hợp văn hóa': response["phu_hop_van_hoa"],
582
  'Khả năng học hỏi': response["kha_nang_hoc_hoi"],
583
+ 'Điểm cộng': response["diem_cong"],
584
+ 'Điểm trừ': response["diem_tru"],
585
  'Điểm tổng quát': main_CV_score,
586
  'Tóm tắt': response["tom_tat"]
587
  }