bulubula commited on
Commit
c2dbd2f
·
1 Parent(s): 919a76a
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -83,9 +83,16 @@ def main():
83
  if not winning_hotkeys.empty:
84
  best_hotkey = winning_hotkeys.idxmax()
85
 
86
- # get the best model with the winning hotkey
87
- best_model = model_evaluations[competition][model_evaluations[competition]["Hotkey"] == best_hotkey].iloc[0]
88
- st.session_state.leader_info[competition] = update_leader_info(st.session_state.leader_info, competition, best_model)
 
 
 
 
 
 
 
89
  else:
90
  st.session_state.leader_info[competition] = {
91
  "Hotkey": "N/A",
 
83
  if not winning_hotkeys.empty:
84
  best_hotkey = winning_hotkeys.idxmax()
85
 
86
+ # Filter models for the best hotkey
87
+ best_model_filtered = model_evaluations[competition][model_evaluations[competition]["Hotkey"] == best_hotkey]
88
+
89
+ # Check if the filtered DataFrame is not empty
90
+ if not best_model_filtered.empty:
91
+ best_model = best_model_filtered.iloc[0]
92
+ st.session_state.leader_info[competition] = update_leader_info(st.session_state.leader_info, competition, best_model)
93
+ else:
94
+ st.warning(f"No model found for the best hotkey: {best_hotkey} in competition {competition}.")
95
+
96
  else:
97
  st.session_state.leader_info[competition] = {
98
  "Hotkey": "N/A",