Spaces:
Running
Running
[release] speechIQ layout imprv
Browse files- .DS_Store +0 -0
- app.py +35 -17
- src/display/css_html_js.py +46 -0
.DS_Store
ADDED
|
Binary file (6.15 kB). View file
|
|
|
app.py
CHANGED
|
@@ -26,11 +26,27 @@ def load_speechiq_data():
|
|
| 26 |
# Sort by Speech IQ score in descending order
|
| 27 |
df = df.sort_values('Speech IQ', ascending=False)
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
return df
|
| 30 |
except Exception as e:
|
| 31 |
print(f"Error loading SpeechIQ data: {e}")
|
| 32 |
# Return empty dataframe with expected columns if file not found
|
| 33 |
-
return pd.DataFrame(columns=['
|
| 34 |
|
| 35 |
def get_top_performers(df):
|
| 36 |
"""Get statistics about top performers."""
|
|
@@ -44,15 +60,15 @@ def get_top_performers(df):
|
|
| 44 |
end2end_best = df[df['Model Type'].str.contains('End2End', na=False)]['Speech IQ'].max() if not df[df['Model Type'].str.contains('End2End', na=False)].empty else 0
|
| 45 |
|
| 46 |
stats_text = f"""
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
**π Top Performer:** {top_model['Setup']} (Score: {top_score})
|
| 50 |
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
| 56 |
"""
|
| 57 |
|
| 58 |
return stats_text
|
|
@@ -70,16 +86,17 @@ with demo:
|
|
| 70 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
| 71 |
with gr.TabItem("π
SpeechIQ Leaderboard", elem_id="speechiq-leaderboard-tab", id=0):
|
| 72 |
|
| 73 |
-
# Statistics section
|
| 74 |
with gr.Row():
|
| 75 |
-
gr.Markdown(get_top_performers(speechiq_df), elem_classes="markdown-text")
|
| 76 |
|
| 77 |
# Main leaderboard table
|
| 78 |
with gr.Row():
|
| 79 |
leaderboard_table = gr.Dataframe(
|
| 80 |
value=speechiq_df,
|
| 81 |
-
headers=speechiq_df.columns.tolist() if not speechiq_df.empty else ['
|
| 82 |
-
interactive=False
|
|
|
|
| 83 |
)
|
| 84 |
|
| 85 |
# Legend and explanation
|
|
@@ -87,13 +104,14 @@ with demo:
|
|
| 87 |
gr.Markdown("""
|
| 88 |
### π Column Explanations
|
| 89 |
|
| 90 |
-
- **
|
| 91 |
-
- **
|
| 92 |
-
- **Audio Encoder**: The audio processing component used
|
| 93 |
- **Remember**: Verbatim accuracy score (WER-based)
|
| 94 |
- **Understand**: Semantic interpretation similarity score
|
| 95 |
- **Apply**: Downstream task performance score
|
| 96 |
-
- **
|
|
|
|
|
|
|
| 97 |
|
| 98 |
*Higher scores indicate better performance across all metrics.*
|
| 99 |
""", elem_classes="markdown-text")
|
|
|
|
| 26 |
# Sort by Speech IQ score in descending order
|
| 27 |
df = df.sort_values('Speech IQ', ascending=False)
|
| 28 |
|
| 29 |
+
# Add ranking with medal emojis
|
| 30 |
+
df['Rank'] = ''
|
| 31 |
+
for i in range(len(df)):
|
| 32 |
+
if i == 0:
|
| 33 |
+
df.iloc[i, df.columns.get_loc('Rank')] = 'π₯'
|
| 34 |
+
elif i == 1:
|
| 35 |
+
df.iloc[i, df.columns.get_loc('Rank')] = 'π₯'
|
| 36 |
+
elif i == 2:
|
| 37 |
+
df.iloc[i, df.columns.get_loc('Rank')] = 'π₯'
|
| 38 |
+
else:
|
| 39 |
+
df.iloc[i, df.columns.get_loc('Rank')] = f'{i+1}'
|
| 40 |
+
|
| 41 |
+
# Reorder columns to put Speech IQ first, then Rank
|
| 42 |
+
column_order = ['Rank', 'Speech IQ', 'Remember', 'Understand', 'Apply', 'Model Type', 'Setup', 'Audio Encoder']
|
| 43 |
+
df = df[column_order]
|
| 44 |
+
|
| 45 |
return df
|
| 46 |
except Exception as e:
|
| 47 |
print(f"Error loading SpeechIQ data: {e}")
|
| 48 |
# Return empty dataframe with expected columns if file not found
|
| 49 |
+
return pd.DataFrame(columns=['Rank', 'Speech IQ', 'Remember', 'Understand', 'Apply', 'Model Type', 'Setup', 'Audio Encoder'])
|
| 50 |
|
| 51 |
def get_top_performers(df):
|
| 52 |
"""Get statistics about top performers."""
|
|
|
|
| 60 |
end2end_best = df[df['Model Type'].str.contains('End2End', na=False)]['Speech IQ'].max() if not df[df['Model Type'].str.contains('End2End', na=False)].empty else 0
|
| 61 |
|
| 62 |
stats_text = f"""
|
| 63 |
+
## π Leaderboard Statistics
|
|
|
|
|
|
|
| 64 |
|
| 65 |
+
| Metric | Value |
|
| 66 |
+
|--------|-------|
|
| 67 |
+
| π **Top Performer** | {top_model['Setup']} |
|
| 68 |
+
| π― **Highest Score** | **{top_score}** |
|
| 69 |
+
| π€ **Best Agentic Model** | {agentic_best} |
|
| 70 |
+
| π **Best End2End Model** | {end2end_best} |
|
| 71 |
+
| π **Total Models** | {len(df)} |
|
| 72 |
"""
|
| 73 |
|
| 74 |
return stats_text
|
|
|
|
| 86 |
with gr.Tabs(elem_classes="tab-buttons") as tabs:
|
| 87 |
with gr.TabItem("π
SpeechIQ Leaderboard", elem_id="speechiq-leaderboard-tab", id=0):
|
| 88 |
|
| 89 |
+
# Statistics section - moved before table
|
| 90 |
with gr.Row():
|
| 91 |
+
gr.Markdown(get_top_performers(speechiq_df), elem_classes="markdown-text stats-section")
|
| 92 |
|
| 93 |
# Main leaderboard table
|
| 94 |
with gr.Row():
|
| 95 |
leaderboard_table = gr.Dataframe(
|
| 96 |
value=speechiq_df,
|
| 97 |
+
headers=speechiq_df.columns.tolist() if not speechiq_df.empty else ['Rank', 'Speech IQ', 'Remember', 'Understand', 'Apply', 'Model Type', 'Setup', 'Audio Encoder'],
|
| 98 |
+
interactive=False,
|
| 99 |
+
elem_classes="leaderboard-table"
|
| 100 |
)
|
| 101 |
|
| 102 |
# Legend and explanation
|
|
|
|
| 104 |
gr.Markdown("""
|
| 105 |
### π Column Explanations
|
| 106 |
|
| 107 |
+
- **Rank**: Position ranking with π₯π₯π₯ medals for top 3 performers
|
| 108 |
+
- **Speech IQ**: Overall intelligence quotient combining all dimensions (primary metric)
|
|
|
|
| 109 |
- **Remember**: Verbatim accuracy score (WER-based)
|
| 110 |
- **Understand**: Semantic interpretation similarity score
|
| 111 |
- **Apply**: Downstream task performance score
|
| 112 |
+
- **Model Type**: Architecture approach (Agentic vs End2End)
|
| 113 |
+
- **Setup**: Specific model configuration and components
|
| 114 |
+
- **Audio Encoder**: The audio processing component used
|
| 115 |
|
| 116 |
*Higher scores indicate better performance across all metrics.*
|
| 117 |
""", elem_classes="markdown-text")
|
src/display/css_html_js.py
CHANGED
|
@@ -4,6 +4,52 @@ custom_css = """
|
|
| 4 |
font-size: 16px !important;
|
| 5 |
}
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
#models-to-add-text {
|
| 8 |
font-size: 18px !important;
|
| 9 |
}
|
|
|
|
| 4 |
font-size: 16px !important;
|
| 5 |
}
|
| 6 |
|
| 7 |
+
.stats-section {
|
| 8 |
+
background-color: #f8f9fa;
|
| 9 |
+
padding: 20px;
|
| 10 |
+
border-radius: 10px;
|
| 11 |
+
margin-bottom: 20px;
|
| 12 |
+
border-left: 4px solid #007bff;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
/* Style for leaderboard table */
|
| 16 |
+
.leaderboard-table table {
|
| 17 |
+
font-size: 14px !important;
|
| 18 |
+
border-collapse: collapse !important;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.leaderboard-table td,
|
| 22 |
+
.leaderboard-table th {
|
| 23 |
+
padding: 8px !important;
|
| 24 |
+
border: 1px solid #dee2e6 !important;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
/* Make Model Type, Setup, and Audio Encoder columns smaller */
|
| 28 |
+
.leaderboard-table td:nth-child(6), /* Model Type */
|
| 29 |
+
.leaderboard-table td:nth-child(7), /* Setup */
|
| 30 |
+
.leaderboard-table td:nth-child(8), /* Audio Encoder */
|
| 31 |
+
.leaderboard-table th:nth-child(6),
|
| 32 |
+
.leaderboard-table th:nth-child(7),
|
| 33 |
+
.leaderboard-table th:nth-child(8) {
|
| 34 |
+
font-size: 11px !important;
|
| 35 |
+
line-height: 1.2 !important;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
/* Highlight Speech IQ column */
|
| 39 |
+
.leaderboard-table td:nth-child(2), /* Speech IQ */
|
| 40 |
+
.leaderboard-table th:nth-child(2) {
|
| 41 |
+
font-weight: bold !important;
|
| 42 |
+
background-color: #fff3cd !important;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
/* Style rank column */
|
| 46 |
+
.leaderboard-table td:nth-child(1), /* Rank */
|
| 47 |
+
.leaderboard-table th:nth-child(1) {
|
| 48 |
+
text-align: center !important;
|
| 49 |
+
font-size: 18px !important;
|
| 50 |
+
font-weight: bold !important;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
#models-to-add-text {
|
| 54 |
font-size: 18px !important;
|
| 55 |
}
|