Spaces:
Sleeping
Sleeping
Ko-TTS-Arena Contributors
commited on
Commit
·
302663a
1
Parent(s):
88cf8f6
stats (add chars)
Browse files- models.py +4 -0
- templates/leaderboard.html +19 -1
models.py
CHANGED
|
@@ -704,6 +704,9 @@ def get_voting_statistics():
|
|
| 704 |
# Average votes per user
|
| 705 |
avg_votes_per_user = round(total_votes / total_voters, 1) if total_voters > 0 else 0
|
| 706 |
|
|
|
|
|
|
|
|
|
|
| 707 |
# Votes in the last 24 hours
|
| 708 |
yesterday = datetime.utcnow() - timedelta(days=1)
|
| 709 |
votes_last_24h = Vote.query.filter(Vote.vote_date >= yesterday).count()
|
|
@@ -719,6 +722,7 @@ def get_voting_statistics():
|
|
| 719 |
"total_voters": total_voters,
|
| 720 |
"total_votes": total_votes,
|
| 721 |
"avg_votes_per_user": avg_votes_per_user,
|
|
|
|
| 722 |
"votes_last_24h": votes_last_24h,
|
| 723 |
"votes_last_7d": votes_last_7d,
|
| 724 |
"active_models": active_models,
|
|
|
|
| 704 |
# Average votes per user
|
| 705 |
avg_votes_per_user = round(total_votes / total_voters, 1) if total_voters > 0 else 0
|
| 706 |
|
| 707 |
+
# Total characters evaluated (sum of text lengths)
|
| 708 |
+
total_characters = db.session.query(func.sum(func.length(Vote.text))).scalar() or 0
|
| 709 |
+
|
| 710 |
# Votes in the last 24 hours
|
| 711 |
yesterday = datetime.utcnow() - timedelta(days=1)
|
| 712 |
votes_last_24h = Vote.query.filter(Vote.vote_date >= yesterday).count()
|
|
|
|
| 722 |
"total_voters": total_voters,
|
| 723 |
"total_votes": total_votes,
|
| 724 |
"avg_votes_per_user": avg_votes_per_user,
|
| 725 |
+
"total_characters": total_characters,
|
| 726 |
"votes_last_24h": votes_last_24h,
|
| 727 |
"votes_last_7d": votes_last_7d,
|
| 728 |
"active_models": active_models,
|
templates/leaderboard.html
CHANGED
|
@@ -770,6 +770,16 @@
|
|
| 770 |
color: white;
|
| 771 |
}
|
| 772 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 773 |
.stat-icon {
|
| 774 |
font-size: 2.5rem;
|
| 775 |
line-height: 1;
|
|
@@ -1132,7 +1142,15 @@
|
|
| 1132 |
</div>
|
| 1133 |
</div>
|
| 1134 |
|
| 1135 |
-
<div class="stat-card
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1136 |
<div class="stat-icon">🎙️</div>
|
| 1137 |
<div class="stat-content">
|
| 1138 |
<div class="stat-value">{{ voting_stats.active_models }}</div>
|
|
|
|
| 770 |
color: white;
|
| 771 |
}
|
| 772 |
|
| 773 |
+
.stat-card.highlight {
|
| 774 |
+
background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
|
| 775 |
+
color: white;
|
| 776 |
+
}
|
| 777 |
+
|
| 778 |
+
.stat-card.full-width {
|
| 779 |
+
grid-column: 1 / -1;
|
| 780 |
+
justify-content: center;
|
| 781 |
+
}
|
| 782 |
+
|
| 783 |
.stat-icon {
|
| 784 |
font-size: 2.5rem;
|
| 785 |
line-height: 1;
|
|
|
|
| 1142 |
</div>
|
| 1143 |
</div>
|
| 1144 |
|
| 1145 |
+
<div class="stat-card highlight">
|
| 1146 |
+
<div class="stat-icon">✍️</div>
|
| 1147 |
+
<div class="stat-content">
|
| 1148 |
+
<div class="stat-value">{{ "{:,}".format(voting_stats.total_characters) }}</div>
|
| 1149 |
+
<div class="stat-label">총 평가 글자 수</div>
|
| 1150 |
+
</div>
|
| 1151 |
+
</div>
|
| 1152 |
+
|
| 1153 |
+
<div class="stat-card info full-width">
|
| 1154 |
<div class="stat-icon">🎙️</div>
|
| 1155 |
<div class="stat-content">
|
| 1156 |
<div class="stat-value">{{ voting_stats.active_models }}</div>
|