Spaces:
Running
Running
add inactive reason
Browse files- storage.py +6 -1
storage.py
CHANGED
|
@@ -129,7 +129,12 @@ def get_leaderboard(models_data: List[Dict[str, Any]]) -> List[List[Any]]:
|
|
| 129 |
votes = vote_counts.get(m_id, 0)
|
| 130 |
|
| 131 |
rating_str = f"{round(player.rating, 1)} ± {round(player.rd * 1.96, 1)}" # 95% confidence interval
|
| 132 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
leaderboard.append([
|
| 135 |
m["name"],
|
|
|
|
| 129 |
votes = vote_counts.get(m_id, 0)
|
| 130 |
|
| 131 |
rating_str = f"{round(player.rating, 1)} ± {round(player.rd * 1.96, 1)}" # 95% confidence interval
|
| 132 |
+
|
| 133 |
+
# Use custom reason if provided, otherwise default
|
| 134 |
+
if not m.get("active", True):
|
| 135 |
+
status = m.get("reason", "Inactive")
|
| 136 |
+
else:
|
| 137 |
+
status = "Active"
|
| 138 |
|
| 139 |
leaderboard.append([
|
| 140 |
m["name"],
|