Spaces:
Sleeping
Sleeping
qfix
Browse files
app.py
CHANGED
|
@@ -83,9 +83,16 @@ def main():
|
|
| 83 |
if not winning_hotkeys.empty:
|
| 84 |
best_hotkey = winning_hotkeys.idxmax()
|
| 85 |
|
| 86 |
-
#
|
| 87 |
-
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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",
|