sparshmehta commited on
Commit
1c68fc6
·
verified ·
1 Parent(s): 76d9a15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1287,12 +1287,19 @@ def display_evaluation(evaluation: Dict[str, Any]):
1287
 
1288
  profile_matches = recommendations.get("profileMatches", [])
1289
 
 
 
 
 
 
 
1290
  for profile_key, profile_data in profiles.items():
1291
  match_info = next(
1292
  (match for match in profile_matches if match["profile"] == profile_key),
1293
  None
1294
  )
1295
- is_recommended = match_info is not None and match_info.get("match", False)
 
1296
 
1297
  st.markdown(f"""
1298
  <div class="profile-card {'recommended' if is_recommended else ''}">
 
1287
 
1288
  profile_matches = recommendations.get("profileMatches", [])
1289
 
1290
+ # Find the recommended profile
1291
+ recommended_profile = next(
1292
+ (match["profile"] for match in profile_matches if match.get("match", False)),
1293
+ None
1294
+ )
1295
+
1296
  for profile_key, profile_data in profiles.items():
1297
  match_info = next(
1298
  (match for match in profile_matches if match["profile"] == profile_key),
1299
  None
1300
  )
1301
+ # Only mark as recommended if it matches the single recommended profile
1302
+ is_recommended = profile_key == recommended_profile
1303
 
1304
  st.markdown(f"""
1305
  <div class="profile-card {'recommended' if is_recommended else ''}">