Frararo commited on
Commit
1041366
·
verified ·
1 Parent(s): 3b94137

add inactive reason

Browse files
Files changed (1) hide show
  1. 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
- status = "Inactive" if not m.get("active", True) else "Active"
 
 
 
 
 
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"],