Fix sorting
Browse files
app.py
CHANGED
@@ -66,10 +66,10 @@ def update_rankings_table():
|
|
66 |
["RemoveBG", int(elo_scores["RemoveBG"]), int(bootstrap_elo_scores["RemoveBG"]), votes_per_model.get("RemoveBG", 0)],
|
67 |
["BRIA RMBG 2.0", int(elo_scores["BRIA RMBG 2.0"]), int(bootstrap_elo_scores["BRIA RMBG 2.0"]), votes_per_model.get("BRIA RMBG 2.0", 0)],
|
68 |
]
|
|
|
69 |
except KeyError as e:
|
70 |
logging.error("Missing score for model: %s", str(e))
|
71 |
return []
|
72 |
-
rankings.sort(key=lambda x: x[2], reverse=True)
|
73 |
return rankings
|
74 |
|
75 |
|
|
|
66 |
["RemoveBG", int(elo_scores["RemoveBG"]), int(bootstrap_elo_scores["RemoveBG"]), votes_per_model.get("RemoveBG", 0)],
|
67 |
["BRIA RMBG 2.0", int(elo_scores["BRIA RMBG 2.0"]), int(bootstrap_elo_scores["BRIA RMBG 2.0"]), votes_per_model.get("BRIA RMBG 2.0", 0)],
|
68 |
]
|
69 |
+
rankings.sort(key=lambda x: x[2], reverse=True)
|
70 |
except KeyError as e:
|
71 |
logging.error("Missing score for model: %s", str(e))
|
72 |
return []
|
|
|
73 |
return rankings
|
74 |
|
75 |
|