zhuohan-7 commited on
Commit
abc1e1a
·
verified ·
1 Parent(s): 16a8b97

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. app/draw_diagram.py +13 -17
  2. app/pages.py +191 -51
app/draw_diagram.py CHANGED
@@ -59,19 +59,14 @@ def nav_to(value):
59
  except:
60
  pass
61
 
62
- def draw(folder_name,category_name, dataset_name, sorted):
63
 
64
- folder = f"./results/{folder_name}/"
65
 
66
  display_names = {
67
- 'ASR': 'Automatic Speech Recognition',
68
- 'SQA': 'Speech Question Answering',
69
- 'SI': 'Speech Instruction',
70
- 'AC': 'Audio Captioning',
71
- 'AQA': 'Audio Scene Question Answering',
72
- 'AR': 'Accent Recognition',
73
- 'GR': 'Gender Recognition',
74
- 'ER': 'Emotion Recognition'
75
  }
76
 
77
  data_path = f'{folder}/{category_name.lower()}.csv'
@@ -81,14 +76,15 @@ def draw(folder_name,category_name, dataset_name, sorted):
81
  return
82
 
83
 
84
- if sorted == 'Ascending':
85
- ascend = True
86
- else:
87
- ascend = False
88
 
89
- sort_by = dataset_name.replace('-', '_').lower()
 
90
 
91
- chart_data = chart_data.sort_values(by=[sort_by], ascending=ascend)
92
 
93
  min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
94
  max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
@@ -106,7 +102,7 @@ def draw(folder_name,category_name, dataset_name, sorted):
106
 
107
 
108
  options = {
109
- "title": {"text": f"{display_names[category_name]}"},
110
  "tooltip": {
111
  "trigger": "axis",
112
  "axisPointer": {"type": "cross", "label": {"backgroundColor": "#6a7985"}},
 
59
  except:
60
  pass
61
 
62
+ def draw(folder_name, category_name, dataset_name, metrics):
63
 
64
+ folder = f"./results/{metrics}/"
65
 
66
  display_names = {
67
+ 'SU': 'Speech Understanding',
68
+ 'ASU': 'Audio Scene Understanding',
69
+ 'VU': 'Voice Understanding'
 
 
 
 
 
70
  }
71
 
72
  data_path = f'{folder}/{category_name.lower()}.csv'
 
76
  return
77
 
78
 
79
+ # if sorted == 'Ascending':
80
+ # ascend = True
81
+ # else:
82
+ # ascend = False
83
 
84
+ dataset_name = dataset_name.replace('-', '_').lower()
85
+ chart_data = chart_data[['Model', dataset_name]]
86
 
87
+ chart_data = chart_data.sort_values(by=[dataset_name], ascending=False)
88
 
89
  min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
90
  max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
 
102
 
103
 
104
  options = {
105
+ "title": {"text": f"{display_names[folder_name.upper()]}"},
106
  "tooltip": {
107
  "trigger": "axis",
108
  "axisPointer": {"type": "cross", "label": {"backgroundColor": "#6a7985"}},
app/pages.py CHANGED
@@ -68,93 +68,233 @@ def dashboard():
68
  }
69
  ''')
70
 
71
- def speech_understanding():
72
- st.title("Speech Understanding")
73
 
74
- filters_levelone = ['ASR', 'SQA', 'SI']
75
- sort_leveltwo = []
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
78
 
79
  with left:
80
- filter_1 = st.selectbox('Select Category', filters_levelone)
81
 
82
- with middle:
83
- if filter_1 == filters_levelone[0]:
84
- sort_leveltwo = ['LibriSpeech-Test-Clean', 'LibriSpeech-Test-Other', 'Common-Voice-15-En-Test', 'Peoples-Speech-Test',
85
- 'GigaSpeech-Test', 'Tedlium3-Test','Tedlium3-Longform-Test', 'Earning-21-Test', 'Earning-22-Test']
86
- elif filter_1 == filters_levelone[1]:
87
- sort_leveltwo = ['CN-College-Listen-Test', 'SLUE-P2-SQA5-Test', 'DREAM-TTS-Test', 'Public-SG-SpeechQA-Test']
88
 
89
- elif filter_1 == filters_levelone[2]:
90
- sort_leveltwo = ['OpenHermes-Audio-Test', 'ALPACA-Audio-Test']
91
 
92
- sort = st.selectbox("Sort Dataset", sort_leveltwo)
93
 
94
- with right:
95
- sorted = st.selectbox('by', ['Ascending', 'Descending'])
96
 
97
- if filter_1 or sort or sorted:
98
- draw('su',filter_1, sort, sorted)
99
  else:
100
- draw('su', 'ASR', 'LibriSpeech-Test-Clean', 'Descending')
101
 
 
 
 
 
102
 
103
- def audio_scene_understanding():
104
- st.title("Audio Scence Understanding")
 
105
 
106
- filters_levelone = ['AQA', 'AC']
107
- sort_leveltwo = []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
 
109
  left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
110
 
111
  with left:
112
- filter_1 = st.selectbox('Select Category', filters_levelone)
 
 
 
 
 
 
 
 
 
 
 
 
113
 
 
 
 
 
114
  with middle:
115
- if filter_1 == filters_levelone[0]:
116
- sort_leveltwo = ['Clotho-AQA-Test', 'WavCaps-QA-Test', 'AudioCaps-QA-Test']
117
- elif filter_1 == filters_levelone[1]:
118
- sort_leveltwo = ['WavCaps-Test', 'AudioCaps-Test']
 
 
 
119
 
120
- sort = st.selectbox("Sort Dataset", sort_leveltwo)
121
 
122
- with right:
123
- sorted = st.selectbox('by', ['Ascending', 'Descending'])
124
 
125
- if filter_1 or sort or sorted:
126
- draw('asu',filter_1, sort, sorted)
127
  else:
128
- draw('asu', 'AQA', 'Clotho-AQA-Test', 'Descending')
129
 
 
 
130
 
131
- def voice_understanding():
132
- st.title("Voice Understanding")
 
 
 
 
 
 
 
 
 
 
 
133
 
134
- filters_levelone = ['ER', 'AR', 'GR']
 
 
 
 
 
135
  sort_leveltwo = []
136
 
137
  left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
138
 
139
  with left:
140
- filter_1 = st.selectbox('Select Category', filters_levelone)
141
 
142
- with middle:
143
- if filter_1 == filters_levelone[0]:
144
- sort_leveltwo = ['IEMOCAP-Emotion-Test', 'MELD-Sentiment-Test', 'MELD-Emotion-Test']
145
 
146
- elif filter_1 == filters_levelone[1]:
147
- sort_leveltwo = ['VoxCeleb1-Accent-Test']
148
 
149
- elif filter_1 == filters_levelone[2]:
150
- sort_leveltwo = ['VoxCeleb1-Gender-Test', 'IEMOCAP-Gender-Test']
151
 
152
- sort = st.selectbox("Sort Dataset", sort_leveltwo)
153
 
154
- with right:
155
- sorted = st.selectbox('by', ['Ascending', 'Descending'])
 
 
 
 
 
 
 
 
156
 
157
- if filter_1 or sort or sorted:
158
- draw('vu',filter_1, sort, sorted)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  else:
160
- draw('vu', 'ER', 'IEMOCAP-Emotion-Test', 'Descending')
 
68
  }
69
  ''')
70
 
71
+ def asr():
72
+ st.title("Automatic Speech Recognition")
73
 
74
+ filters_levelone = ['LibriSpeech-Test-Clean',
75
+ 'LibriSpeech-Test-Other',
76
+ 'Common-Voice-15-En-Test',
77
+ 'Peoples-Speech-Test',
78
+ 'GigaSpeech-Test',
79
+ 'Earning-21-Test',
80
+ 'Earning-22-Test',
81
+ 'Tedlium3-Test',
82
+ 'Tedlium3-Longform-Test',
83
+ 'IMDA-Part1-ASR-Test',
84
+ 'IMDA-Part2-ASR-Test',
85
+ 'IMDA-Part3-ASR-Test',
86
+ 'IMDA-Part4-ASR-Test',
87
+ 'IMDA-Part5-ASR-Test',
88
+ 'IMDA-Part6-ASR-Test']
89
 
90
  left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
91
 
92
  with left:
93
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
94
 
95
+ # with middle:
96
+ # if filter_1 == filters_levelone[0]:
97
+ # sort_leveltwo = ['LibriSpeech-Test-Clean', 'LibriSpeech-Test-Other', 'Common-Voice-15-En-Test', 'Peoples-Speech-Test',
98
+ # 'GigaSpeech-Test', 'Tedlium3-Test','Tedlium3-Longform-Test', 'Earning-21-Test', 'Earning-22-Test']
99
+ # elif filter_1 == filters_levelone[1]:
100
+ # sort_leveltwo = ['CN-College-Listen-Test', 'SLUE-P2-SQA5-Test', 'DREAM-TTS-Test', 'Public-SG-SpeechQA-Test']
101
 
102
+ # elif filter_1 == filters_levelone[2]:
103
+ # sort_leveltwo = ['OpenHermes-Audio-Test', 'ALPACA-Audio-Test']
104
 
105
+ # sort = st.selectbox("Sort Dataset", sort_leveltwo)
106
 
107
+ # with right:
108
+ # sorted = st.selectbox('by', ['Ascending', 'Descending'])
109
 
110
+ if filter_1:
111
+ draw('su', 'ASR', filter_1, 'wer')
112
  else:
113
+ draw('su', 'ASR', 'LibriSpeech-Test-Clean', 'wer')
114
 
115
+ def sqa():
116
+ st.title("Speech Question Answering")
117
+
118
+ binary = ['CN-College-Listen-Test', 'DREAM-TTS-MCQ-Test']
119
 
120
+ rest = ['SLUE-P2-SQA5-Test',
121
+ 'Public-SG-SpeechQA-Test',
122
+ 'Spoken-Squad-v1']
123
 
124
+ filters_levelone = binary + rest
125
+
126
+ left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
127
+
128
+ with left:
129
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
130
+
131
+ if filter_1:
132
+ if filter_1 in binary:
133
+ draw('su', 'SQA', filter_1, 'llama3_70b_judge_binary')
134
+ else:
135
+ draw('su', 'SQA', filter_1, 'llama3_70b_judge')
136
+ else:
137
+ draw('su', 'SQA', 'CN-College-Listen-Test', 'llama3_70b_judge_binary')
138
+
139
+ def si():
140
+ st.title("Speech Question Answering")
141
+
142
+ filters_levelone = ['OpenHermes-Audio-Test',
143
+ 'ALPACA-Audio-Test']
144
 
145
  left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
146
 
147
  with left:
148
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
149
+
150
+ if filter_1:
151
+ draw('su', 'SI', filter_1, 'llama3_70b_judge')
152
+ else:
153
+ draw('su', 'SI', 'OpenHermes-Audio-Test', 'llama3_70b_judge')
154
+
155
+ def ac():
156
+ st.title("Audio Captioning")
157
+
158
+ filters_levelone = ['WavCaps-Test',
159
+ 'AudioCaps-Test']
160
+ filters_leveltwo = ['Llama3-70b-judge', 'Meteor']
161
 
162
+ left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
163
+
164
+ with left:
165
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
166
  with middle:
167
+ metric = st.selectbox('Select Metric', filters_leveltwo)
168
+
169
+ # with middle:
170
+ # if filter_1 == filters_levelone[0]:
171
+ # sort_leveltwo = ['Clotho-AQA-Test', 'WavCaps-QA-Test', 'AudioCaps-QA-Test']
172
+ # elif filter_1 == filters_levelone[1]:
173
+ # sort_leveltwo = ['WavCaps-Test', 'AudioCaps-Test']
174
 
175
+ # sort = st.selectbox("Sort Dataset", sort_leveltwo)
176
 
177
+ # with right:
178
+ # sorted = st.selectbox('by', ['Ascending', 'Descending'])
179
 
180
+ if filter_1 or metric:
181
+ draw('asu', 'AC',filter_1, metric.lower().replace('-', '_'))
182
  else:
183
+ draw('asu', 'AC', 'WavCaps-Test', 'llama3_70b_judge')
184
 
185
+ def asqa():
186
+ st.title("Audio Scene Question Answering")
187
 
188
+ filters_levelone = ['Clotho-AQA-Test',
189
+ 'WavCaps-QA-Test',
190
+ 'AudioCaps-QA-Test']
191
+
192
+ left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
193
+
194
+ with left:
195
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
196
+
197
+ if filter_1:
198
+ draw('asu', 'AC',filter_1, 'llama3_70b_judge')
199
+ else:
200
+ draw('asu', 'AC', 'Clotho-AQA-Test', 'llama3_70b_judge')
201
 
202
+ def er():
203
+ st.title("Emotion Recognition")
204
+
205
+ filters_levelone = ['IEMOCAP-Emotion-Test',
206
+ 'MELD-Sentiment-Test',
207
+ 'MELD-Emotion-Test']
208
  sort_leveltwo = []
209
 
210
  left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
211
 
212
  with left:
213
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
214
 
215
+ # with middle:
216
+ # if filter_1 == filters_levelone[0]:
217
+ # sort_leveltwo = ['IEMOCAP-Emotion-Test', 'MELD-Sentiment-Test', 'MELD-Emotion-Test']
218
 
219
+ # elif filter_1 == filters_levelone[1]:
220
+ # sort_leveltwo = ['VoxCeleb1-Accent-Test']
221
 
222
+ # elif filter_1 == filters_levelone[2]:
223
+ # sort_leveltwo = ['VoxCeleb1-Gender-Test', 'IEMOCAP-Gender-Test']
224
 
225
+ # sort = st.selectbox("Sort Dataset", sort_leveltwo)
226
 
227
+ # with right:
228
+ # sorted = st.selectbox('by', ['Ascending', 'Descending'])
229
+
230
+ if filter_1:
231
+ draw('vu', 'ER', filter_1, 'llama3_70b_judge_binary')
232
+ else:
233
+ draw('vu', 'ER', 'IEMOCAP-Emotion-Test', 'llama3_70b_judge_binary')
234
+
235
+ def ar():
236
+ st.title("Accent Recognition")
237
 
238
+ filters_levelone = ['VoxCeleb1-Accent-Test']
239
+
240
+ left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
241
+
242
+ with left:
243
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
244
+
245
+
246
+ if filter_1:
247
+ draw('vu', 'AR', filter_1, 'llama3_70b_judge')
248
+ else:
249
+ draw('vu', 'AR', 'VoxCeleb1-Accent-Test', 'llama3_70b_judge')
250
+
251
+ def gr():
252
+ st.title("Emotion Recognition")
253
+
254
+ filters_levelone = ['VoxCeleb1-Gender-Test',
255
+ 'IEMOCAP-Gender-Test']
256
+
257
+ left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
258
+
259
+ with left:
260
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
261
+
262
+ if filter_1:
263
+ draw('vu', 'GR', filter_1, 'llama3_70b_judge_binary')
264
+ else:
265
+ draw('vu', 'GR', 'VoxCeleb1-Gender-Test', 'llama3_70b_judge_binary')
266
+
267
+ def st():
268
+ st.title("Speech Translation")
269
+
270
+ filters_levelone = ['Covost2-EN-ID-test',
271
+ 'Covost2-EN-ZH-test',
272
+ 'Covost2-EN-TA-test',
273
+ 'Covost2-ID-EN-test',
274
+ 'Covost2-ZH-EN-test',
275
+ 'Covost2-TA-EN-test']
276
+
277
+ left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
278
+
279
+ with left:
280
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
281
+
282
+ if filter_1:
283
+ draw('su', 'ST', filter_1, 'bleu')
284
+ else:
285
+ draw('su', 'ST', 'Covost2-EN-ID-test', 'bleu')
286
+
287
+ def cnasr():
288
+ st.title("Chinese Automatic Speech Recognition")
289
+
290
+ filters_levelone = ['Aishell-ASR-ZH-Test']
291
+
292
+ left, center, _, middle,right = st.columns([0.2, 0.2, 0.2, 0.2 ,0.2])
293
+
294
+ with left:
295
+ filter_1 = st.selectbox('Select Dataset', filters_levelone)
296
+
297
+ if filter_1:
298
+ draw('su', 'CNASR', filter_1, 'wer')
299
  else:
300
+ draw('su', 'CNASR', 'Aishell-ASR-ZH-Test', 'wer')