Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
04ef94e
1
Parent(s):
6ff374c
Remove conversational tab from leaderboard, lower vote threshold to 0
Browse files- models.py +2 -2
- templates/leaderboard.html +7 -208
models.py
CHANGED
|
@@ -343,9 +343,9 @@ def get_leaderboard_data(model_type):
|
|
| 343 |
"""
|
| 344 |
query = Model.query.filter_by(model_type=model_type)
|
| 345 |
|
| 346 |
-
# Get models with >
|
| 347 |
# Note: Model.match_count now only includes votes that count for public leaderboard
|
| 348 |
-
models = query.filter(Model.match_count >
|
| 349 |
|
| 350 |
result = []
|
| 351 |
for rank, model in enumerate(models, 1):
|
|
|
|
| 343 |
"""
|
| 344 |
query = Model.query.filter_by(model_type=model_type)
|
| 345 |
|
| 346 |
+
# Get models with >0 votes ordered by ELO score (한국어 TTS Arena는 새로 시작하므로 임계값 제거)
|
| 347 |
# Note: Model.match_count now only includes votes that count for public leaderboard
|
| 348 |
+
models = query.filter(Model.match_count > 0).order_by(Model.current_elo.desc()).all()
|
| 349 |
|
| 350 |
result = []
|
| 351 |
for rank, model in enumerate(models, 1):
|
templates/leaderboard.html
CHANGED
|
@@ -765,7 +765,6 @@
|
|
| 765 |
{% block content %}
|
| 766 |
<div class="tabs">
|
| 767 |
<div class="tab active" data-tab="tts">TTS</div>
|
| 768 |
-
<div class="tab" data-tab="conversational">Conversational</div>
|
| 769 |
<div class="tab" data-tab="voters">Top Voters</div>
|
| 770 |
</div>
|
| 771 |
|
|
@@ -953,189 +952,6 @@
|
|
| 953 |
</div>
|
| 954 |
</div>
|
| 955 |
|
| 956 |
-
<div id="conversational-tab" class="tab-content" style="display: none;">
|
| 957 |
-
<div class="view-toggle">
|
| 958 |
-
<div class="segmented-control">
|
| 959 |
-
<input type="radio" id="conversational-public" name="conversational-view" checked>
|
| 960 |
-
<label for="conversational-public">Public</label>
|
| 961 |
-
<input type="radio" id="conversational-personal" name="conversational-view">
|
| 962 |
-
<label for="conversational-personal">Personal</label>
|
| 963 |
-
<div class="slider"></div>
|
| 964 |
-
</div>
|
| 965 |
-
</div>
|
| 966 |
-
|
| 967 |
-
<!-- Historical timeline for Conversational models - temporarily disabled -->
|
| 968 |
-
<div id="conversational-timeline-container" class="timeline-container" style="display: none;">
|
| 969 |
-
<div class="timeline-header">
|
| 970 |
-
<div class="timeline-title">
|
| 971 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 972 |
-
<circle cx="12" cy="12" r="10"></circle>
|
| 973 |
-
<polyline points="12 6 12 12 16 14"></polyline>
|
| 974 |
-
</svg>
|
| 975 |
-
Leaderboard History
|
| 976 |
-
</div>
|
| 977 |
-
|
| 978 |
-
<div class="timeline-controls">
|
| 979 |
-
<select id="conversational-date-select" class="timeline-select">
|
| 980 |
-
{% if formatted_conversational_dates %}
|
| 981 |
-
{% for date in formatted_conversational_dates %}
|
| 982 |
-
<option value="{{ conversational_key_dates[loop.index0].strftime('%Y-%m-%d') }}">{{ date }}</option>
|
| 983 |
-
{% endfor %}
|
| 984 |
-
{% else %}
|
| 985 |
-
<option value="">No historical data</option>
|
| 986 |
-
{% endif %}
|
| 987 |
-
</select>
|
| 988 |
-
|
| 989 |
-
<button id="conversational-load-historical" class="timeline-button">
|
| 990 |
-
<span>Load</span>
|
| 991 |
-
<span id="conversational-loading-spinner" class="loading-spinner"></span>
|
| 992 |
-
</button>
|
| 993 |
-
</div>
|
| 994 |
-
</div>
|
| 995 |
-
|
| 996 |
-
{% if conversational_key_dates and conversational_key_dates|length > 1 %}
|
| 997 |
-
<div class="timeline-track">
|
| 998 |
-
<div id="conversational-timeline-progress" class="timeline-progress" style="width: 0%"></div>
|
| 999 |
-
<div id="conversational-timeline-marker" class="timeline-marker" style="left: 0%"></div>
|
| 1000 |
-
</div>
|
| 1001 |
-
<div class="timeline-dates">
|
| 1002 |
-
<div>{{ conversational_key_dates[0].strftime('%b %Y') }}</div>
|
| 1003 |
-
<div>{{ conversational_key_dates[-1].strftime('%b %Y') }}</div>
|
| 1004 |
-
</div>
|
| 1005 |
-
{% else %}
|
| 1006 |
-
<div class="no-data">
|
| 1007 |
-
<p>Not enough historical data available to show timeline.</p>
|
| 1008 |
-
</div>
|
| 1009 |
-
{% endif %}
|
| 1010 |
-
</div>
|
| 1011 |
-
|
| 1012 |
-
<!-- Historical indicator - temporarily disabled -->
|
| 1013 |
-
<div class="historical-indicator" id="conversational-historical-indicator" style="display: none;">
|
| 1014 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 1015 |
-
<circle cx="12" cy="12" r="10"></circle>
|
| 1016 |
-
<polyline points="12 6 12 12 16 14"></polyline>
|
| 1017 |
-
</svg>
|
| 1018 |
-
<span id="conversational-historical-date">Historical view</span>
|
| 1019 |
-
</div>
|
| 1020 |
-
|
| 1021 |
-
<div id="conversational-public-leaderboard" class="leaderboard-view active">
|
| 1022 |
-
{% if conversational_leaderboard and conversational_leaderboard|length > 0 %}
|
| 1023 |
-
<div class="leaderboard-container">
|
| 1024 |
-
<div class="leaderboard-header">
|
| 1025 |
-
<div>Rank</div>
|
| 1026 |
-
<div>Model</div>
|
| 1027 |
-
<div style="text-align: right">Win Rate</div>
|
| 1028 |
-
<div style="text-align: right" class="total-votes-header">Total Votes</div>
|
| 1029 |
-
<div style="text-align: right">ELO</div>
|
| 1030 |
-
</div>
|
| 1031 |
-
|
| 1032 |
-
{% for model in conversational_leaderboard %}
|
| 1033 |
-
<div class="leaderboard-row {{ model.tier }}">
|
| 1034 |
-
<div class="rank">#{{ model.rank }}</div>
|
| 1035 |
-
<div class="model-name">
|
| 1036 |
-
{{ model.name }}
|
| 1037 |
-
<div class="license-icon">
|
| 1038 |
-
{% if not model.is_open %}
|
| 1039 |
-
<img src="{{ url_for('static', filename='closed.svg') }}" alt="Proprietary">
|
| 1040 |
-
<span class="tooltip">Proprietary model</span>
|
| 1041 |
-
{% endif %}
|
| 1042 |
-
</div>
|
| 1043 |
-
{% if model.id == "lanternfish-1" %}
|
| 1044 |
-
<div class="disputed-badge">
|
| 1045 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 1046 |
-
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/>
|
| 1047 |
-
<line x1="12" y1="9" x2="12" y2="13"/>
|
| 1048 |
-
<line x1="12" y1="17" x2="12" y2="17"/>
|
| 1049 |
-
</svg>
|
| 1050 |
-
<span>Disputed</span>
|
| 1051 |
-
<span class="tooltip">Potential vote manipulation</span>
|
| 1052 |
-
</div>
|
| 1053 |
-
{% endif %}
|
| 1054 |
-
</div>
|
| 1055 |
-
<div class="win-rate">{{ model.win_rate }}</div>
|
| 1056 |
-
<div class="total-votes">{{ model.total_votes }}</div>
|
| 1057 |
-
<div class="elo-score">{{ model.elo }}</div>
|
| 1058 |
-
</div>
|
| 1059 |
-
{% endfor %}
|
| 1060 |
-
</div>
|
| 1061 |
-
{% else %}
|
| 1062 |
-
<div class="no-data">
|
| 1063 |
-
<h3>No data available yet</h3>
|
| 1064 |
-
<p>Be the first to vote and help build the conversational leaderboard! Compare models in the arena to see how they stack up.</p>
|
| 1065 |
-
<a href="{{ url_for('arena') }}#conversational" class="btn">Go to Arena</a>
|
| 1066 |
-
</div>
|
| 1067 |
-
{% endif %}
|
| 1068 |
-
</div>
|
| 1069 |
-
|
| 1070 |
-
<div id="conversational-personal-leaderboard" class="leaderboard-view" style="display: none;">
|
| 1071 |
-
{% if current_user.is_authenticated and conversational_personal_leaderboard and conversational_personal_leaderboard|length > 0 %}
|
| 1072 |
-
<div class="leaderboard-container">
|
| 1073 |
-
<div class="leaderboard-header">
|
| 1074 |
-
<div>Rank</div>
|
| 1075 |
-
<div>Model</div>
|
| 1076 |
-
<div style="text-align: right">Win Rate</div>
|
| 1077 |
-
<div style="text-align: right" class="total-votes-header">Total Votes</div>
|
| 1078 |
-
<div style="text-align: right">Wins</div>
|
| 1079 |
-
</div>
|
| 1080 |
-
|
| 1081 |
-
{% for model in conversational_personal_leaderboard %}
|
| 1082 |
-
<div class="leaderboard-row">
|
| 1083 |
-
<div class="rank">#{{ model.rank }}</div>
|
| 1084 |
-
<div class="model-name">
|
| 1085 |
-
{{ model.name }}
|
| 1086 |
-
<div class="license-icon">
|
| 1087 |
-
{% if not model.is_open %}
|
| 1088 |
-
<img src="{{ url_for('static', filename='closed.svg') }}" alt="Proprietary">
|
| 1089 |
-
<span class="tooltip">Proprietary model</span>
|
| 1090 |
-
{% endif %}
|
| 1091 |
-
</div>
|
| 1092 |
-
{% if model.id == "lanternfish-1" %}
|
| 1093 |
-
<div class="disputed-icon">
|
| 1094 |
-
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
| 1095 |
-
<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/>
|
| 1096 |
-
<line x1="12" y1="9" x2="12" y2="13"/>
|
| 1097 |
-
<line x1="12" y1="17" x2="12" y2="17"/>
|
| 1098 |
-
</svg>
|
| 1099 |
-
<span class="tooltip">Disputed - Potential vote manipulation</span>
|
| 1100 |
-
</div>
|
| 1101 |
-
{% endif %}
|
| 1102 |
-
</div>
|
| 1103 |
-
<div class="win-rate">{{ model.win_rate }}</div>
|
| 1104 |
-
<div class="total-votes">{{ model.total_votes }}</div>
|
| 1105 |
-
<div class="elo-score">{{ model.wins }}</div>
|
| 1106 |
-
</div>
|
| 1107 |
-
{% endfor %}
|
| 1108 |
-
</div>
|
| 1109 |
-
{% else %}
|
| 1110 |
-
<div class="no-data">
|
| 1111 |
-
<h3>No personal data yet</h3>
|
| 1112 |
-
<p>You haven't voted on any conversational models yet. Visit the arena to compare models and build your personal leaderboard.</p>
|
| 1113 |
-
<a href="{{ url_for('arena') }}#conversational" class="btn">Go to Arena</a>
|
| 1114 |
-
</div>
|
| 1115 |
-
{% endif %}
|
| 1116 |
-
</div>
|
| 1117 |
-
|
| 1118 |
-
<!-- Historical Conversational leaderboard - temporarily disabled -->
|
| 1119 |
-
<div id="conversational-historical-leaderboard" class="leaderboard-view" style="display: none;">
|
| 1120 |
-
<!-- This will be populated dynamically with JavaScript -->
|
| 1121 |
-
<div class="leaderboard-container">
|
| 1122 |
-
<div class="leaderboard-header">
|
| 1123 |
-
<div>Rank</div>
|
| 1124 |
-
<div>Model</div>
|
| 1125 |
-
<div style="text-align: right">Win Rate</div>
|
| 1126 |
-
<div style="text-align: right" class="total-votes-header">Total Votes</div>
|
| 1127 |
-
<div style="text-align: right">ELO</div>
|
| 1128 |
-
</div>
|
| 1129 |
-
<div id="conversational-historical-rows">
|
| 1130 |
-
<!-- Historical rows will be inserted here -->
|
| 1131 |
-
<div class="no-data">
|
| 1132 |
-
<p>Select a date and click "Load" to view historical data.</p>
|
| 1133 |
-
</div>
|
| 1134 |
-
</div>
|
| 1135 |
-
</div>
|
| 1136 |
-
</div>
|
| 1137 |
-
</div>
|
| 1138 |
-
|
| 1139 |
<!-- Add Top Voters Tab -->
|
| 1140 |
<div id="voters-tab" class="tab-content" style="display: none;">
|
| 1141 |
<div class="voters-leaderboard">
|
|
@@ -1219,7 +1035,7 @@
|
|
| 1219 |
document.addEventListener('DOMContentLoaded', function() {
|
| 1220 |
// Initialize slider positions
|
| 1221 |
const ttsSlider = document.querySelector('#tts-tab .slider');
|
| 1222 |
-
const convSlider = document.querySelector('#conversational-tab .slider');
|
| 1223 |
|
| 1224 |
// Function to position sliders based on selected radio
|
| 1225 |
function positionSliders() {
|
|
@@ -1233,15 +1049,7 @@
|
|
| 1233 |
}
|
| 1234 |
}
|
| 1235 |
|
| 1236 |
-
//
|
| 1237 |
-
if (convSlider) {
|
| 1238 |
-
const convSelectedRadio = document.querySelector('#conversational-tab input[name="conversational-view"]:checked');
|
| 1239 |
-
if (convSelectedRadio) {
|
| 1240 |
-
const convSelectedLabel = document.querySelector(`label[for="${convSelectedRadio.id}"]`);
|
| 1241 |
-
convSlider.style.width = `${convSelectedLabel.offsetWidth}px`;
|
| 1242 |
-
convSlider.style.transform = `translateX(${convSelectedLabel.offsetLeft - 4}px)`;
|
| 1243 |
-
}
|
| 1244 |
-
}
|
| 1245 |
}
|
| 1246 |
|
| 1247 |
// Position sliders on load
|
|
@@ -1254,23 +1062,14 @@
|
|
| 1254 |
// Check URL hash for direct tab access
|
| 1255 |
function checkHashAndSetTab() {
|
| 1256 |
const hash = window.location.hash.toLowerCase();
|
| 1257 |
-
if (hash === '#
|
| 1258 |
-
// Switch to
|
| 1259 |
-
tabs.forEach(t => t.classList.remove('active'));
|
| 1260 |
-
tabContents.forEach(c => c.style.display = 'none');
|
| 1261 |
-
|
| 1262 |
-
document.querySelector('.tab[data-tab="conversational"]').classList.add('active');
|
| 1263 |
-
document.getElementById('conversational-tab').style.display = 'block';
|
| 1264 |
-
|
| 1265 |
-
// Ensure sliders are positioned correctly
|
| 1266 |
-
setTimeout(positionSliders, 50);
|
| 1267 |
-
} else if (hash === '#tts' || hash === '') {
|
| 1268 |
-
// Switch to TTS tab (default)
|
| 1269 |
tabs.forEach(t => t.classList.remove('active'));
|
| 1270 |
tabContents.forEach(c => c.style.display = 'none');
|
| 1271 |
|
| 1272 |
-
|
| 1273 |
-
document.
|
|
|
|
| 1274 |
|
| 1275 |
// Ensure sliders are positioned correctly
|
| 1276 |
setTimeout(positionSliders, 50);
|
|
|
|
| 765 |
{% block content %}
|
| 766 |
<div class="tabs">
|
| 767 |
<div class="tab active" data-tab="tts">TTS</div>
|
|
|
|
| 768 |
<div class="tab" data-tab="voters">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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 955 |
<!-- Add Top Voters Tab -->
|
| 956 |
<div id="voters-tab" class="tab-content" style="display: none;">
|
| 957 |
<div class="voters-leaderboard">
|
|
|
|
| 1035 |
document.addEventListener('DOMContentLoaded', function() {
|
| 1036 |
// Initialize slider positions
|
| 1037 |
const ttsSlider = document.querySelector('#tts-tab .slider');
|
| 1038 |
+
// const convSlider = document.querySelector('#conversational-tab .slider'); // Conversational 제거됨
|
| 1039 |
|
| 1040 |
// Function to position sliders based on selected radio
|
| 1041 |
function positionSliders() {
|
|
|
|
| 1049 |
}
|
| 1050 |
}
|
| 1051 |
|
| 1052 |
+
// Conversational slider 제거됨
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1053 |
}
|
| 1054 |
|
| 1055 |
// Position sliders on load
|
|
|
|
| 1062 |
// Check URL hash for direct tab access
|
| 1063 |
function checkHashAndSetTab() {
|
| 1064 |
const hash = window.location.hash.toLowerCase();
|
| 1065 |
+
if (hash === '#tts' || hash === '' || hash === '#voters') {
|
| 1066 |
+
// Switch to TTS tab (default) or voters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1067 |
tabs.forEach(t => t.classList.remove('active'));
|
| 1068 |
tabContents.forEach(c => c.style.display = 'none');
|
| 1069 |
|
| 1070 |
+
const targetTab = hash === '#voters' ? 'voters' : 'tts';
|
| 1071 |
+
document.querySelector(`.tab[data-tab="${targetTab}"]`).classList.add('active');
|
| 1072 |
+
document.getElementById(`${targetTab}-tab`).style.display = 'block';
|
| 1073 |
|
| 1074 |
// Ensure sliders are positioned correctly
|
| 1075 |
setTimeout(positionSliders, 50);
|