Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Ko-TTS-Arena Contributors
commited on
Commit
·
aebf092
1
Parent(s):
26dd2ec
fix: Hide inactive models from leaderboard
Browse files
models.py
CHANGED
|
@@ -323,6 +323,7 @@ def get_leaderboard_data(model_type):
|
|
| 323 |
"""
|
| 324 |
Get leaderboard data for the specified model type.
|
| 325 |
Only includes votes that count for the public leaderboard.
|
|
|
|
| 326 |
|
| 327 |
Args:
|
| 328 |
model_type (str): The model type ('tts' or 'conversational')
|
|
@@ -330,9 +331,9 @@ def get_leaderboard_data(model_type):
|
|
| 330 |
Returns:
|
| 331 |
list: List of dictionaries containing model data for the leaderboard
|
| 332 |
"""
|
| 333 |
-
query = Model.query.filter_by(model_type=model_type)
|
| 334 |
|
| 335 |
-
# Get models with >0 votes ordered by ELO score
|
| 336 |
# Note: Model.match_count now only includes votes that count for public leaderboard
|
| 337 |
models = query.filter(Model.match_count > 0).order_by(Model.current_elo.desc()).all()
|
| 338 |
|
|
|
|
| 323 |
"""
|
| 324 |
Get leaderboard data for the specified model type.
|
| 325 |
Only includes votes that count for the public leaderboard.
|
| 326 |
+
Only shows active models.
|
| 327 |
|
| 328 |
Args:
|
| 329 |
model_type (str): The model type ('tts' or 'conversational')
|
|
|
|
| 331 |
Returns:
|
| 332 |
list: List of dictionaries containing model data for the leaderboard
|
| 333 |
"""
|
| 334 |
+
query = Model.query.filter_by(model_type=model_type, is_active=True)
|
| 335 |
|
| 336 |
+
# Get active models with >0 votes ordered by ELO score
|
| 337 |
# Note: Model.match_count now only includes votes that count for public leaderboard
|
| 338 |
models = query.filter(Model.match_count > 0).order_by(Model.current_elo.desc()).all()
|
| 339 |
|