Upload app/pages.py with huggingface_hub
Browse files- app/pages.py +42 -52
app/pages.py
CHANGED
@@ -119,6 +119,27 @@ def dashboard():
|
|
119 |
```
|
120 |
""")
|
121 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
|
123 |
def asr_english():
|
124 |
st.title("Task: Automatic Speech Recognition - English")
|
@@ -137,6 +158,7 @@ def asr_english():
|
|
137 |
sum_table_mulit_metrix('asr_english', ['wer'])
|
138 |
else:
|
139 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
|
|
140 |
draw('su', 'asr_english', filter_1, 'wer', cus_sort=True)
|
141 |
|
142 |
|
@@ -157,6 +179,7 @@ def asr_singlish():
|
|
157 |
sum_table_mulit_metrix('asr_singlish', ['wer'])
|
158 |
else:
|
159 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
|
|
160 |
draw('su', 'asr_singlish', filter_1, 'wer')
|
161 |
|
162 |
|
@@ -177,6 +200,7 @@ def asr_mandarin():
|
|
177 |
sum_table_mulit_metrix('asr_mandarin', ['wer'])
|
178 |
else:
|
179 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
|
|
180 |
draw('su', 'asr_mandarin', filter_1, 'wer')
|
181 |
|
182 |
|
@@ -197,7 +221,7 @@ def asr_malay():
|
|
197 |
sum_table_mulit_metrix('asr_malay', ['wer'])
|
198 |
else:
|
199 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
200 |
-
|
201 |
draw('su', 'asr_malay', filter_1, 'wer')
|
202 |
|
203 |
|
@@ -218,6 +242,7 @@ def asr_tamil():
|
|
218 |
sum_table_mulit_metrix('asr_tamil', ['wer'])
|
219 |
else:
|
220 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
|
|
221 |
draw('su', 'asr_tamil', filter_1, 'wer')
|
222 |
|
223 |
|
@@ -238,6 +263,7 @@ def asr_indonesian():
|
|
238 |
sum_table_mulit_metrix('asr_indonesian', ['wer'])
|
239 |
else:
|
240 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
|
|
241 |
draw('su', 'asr_indonesian', filter_1, 'wer')
|
242 |
|
243 |
|
@@ -258,6 +284,7 @@ def asr_thai():
|
|
258 |
sum_table_mulit_metrix('asr_thai', ['wer'])
|
259 |
else:
|
260 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
|
|
261 |
draw('su', 'asr_thai', filter_1, 'wer')
|
262 |
|
263 |
|
@@ -278,6 +305,7 @@ def asr_vietnamese():
|
|
278 |
sum_table_mulit_metrix('asr_vietnamese', ['wer'])
|
279 |
else:
|
280 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
|
|
281 |
draw('su', 'asr_vietnamese', filter_1, 'wer')
|
282 |
|
283 |
|
@@ -298,6 +326,7 @@ def asr_private():
|
|
298 |
sum_table_mulit_metrix('asr_private', ['wer'])
|
299 |
else:
|
300 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
|
|
301 |
draw('su', 'asr_private', filter_1, 'wer')
|
302 |
|
303 |
|
@@ -318,6 +347,7 @@ def speech_translation():
|
|
318 |
sum_table_mulit_metrix('st', ['bleu'])
|
319 |
else:
|
320 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['bleu'])
|
|
|
321 |
draw('su', 'ST', filter_1, 'bleu')
|
322 |
|
323 |
|
@@ -343,6 +373,7 @@ def speech_question_answering_english():
|
|
343 |
|
344 |
else:
|
345 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
346 |
draw('su', 'sqa_english', filter_1, 'llama3_70b_judge')
|
347 |
|
348 |
|
@@ -364,6 +395,7 @@ def speech_question_answering_singlish():
|
|
364 |
|
365 |
else:
|
366 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
367 |
draw('su', 'sqa_singlish', filter_1, 'llama3_70b_judge')
|
368 |
|
369 |
|
@@ -385,6 +417,7 @@ def spoken_dialogue_summarization_singlish():
|
|
385 |
|
386 |
else:
|
387 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
388 |
draw('su', 'sds_singlish', filter_1, 'llama3_70b_judge')
|
389 |
|
390 |
|
@@ -405,6 +438,7 @@ def speech_instruction():
|
|
405 |
sum_table_mulit_metrix('speech_instruction', ['llama3_70b_judge'])
|
406 |
else:
|
407 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
408 |
draw('su', 'speech_instruction', filter_1, 'llama3_70b_judge')
|
409 |
|
410 |
|
@@ -424,6 +458,7 @@ def audio_captioning():
|
|
424 |
|
425 |
if filter_1 or metric:
|
426 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info[metric.lower().replace('-', '_')])
|
|
|
427 |
draw('asu', 'audio_captioning', filter_1, metric.lower().replace('-', '_'))
|
428 |
|
429 |
|
@@ -444,6 +479,7 @@ def audio_scene_question_answering():
|
|
444 |
sum_table_mulit_metrix('audio_scene_question_answering', ['llama3_70b_judge'])
|
445 |
else:
|
446 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
447 |
draw('asu', 'audio_scene_question_answering', filter_1, 'llama3_70b_judge')
|
448 |
|
449 |
|
@@ -464,6 +500,7 @@ def emotion_recognition():
|
|
464 |
sum_table_mulit_metrix('emotion_recognition', ['llama3_70b_judge'])
|
465 |
else:
|
466 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
467 |
draw('vu', 'emotion_recognition', filter_1, 'llama3_70b_judge')
|
468 |
|
469 |
|
@@ -485,6 +522,7 @@ def accent_recognition():
|
|
485 |
sum_table_mulit_metrix('accent_recognition', ['llama3_70b_judge'])
|
486 |
else:
|
487 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
488 |
draw('vu', 'accent_recognition', filter_1, 'llama3_70b_judge')
|
489 |
|
490 |
|
@@ -505,6 +543,7 @@ def gender_recognition():
|
|
505 |
sum_table_mulit_metrix('gender_recognition', ['llama3_70b_judge'])
|
506 |
else:
|
507 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
508 |
draw('vu', 'gender_recognition', filter_1, 'llama3_70b_judge')
|
509 |
|
510 |
|
@@ -525,6 +564,7 @@ def music_understanding():
|
|
525 |
sum_table_mulit_metrix('music_understanding', ['llama3_70b_judge'])
|
526 |
else:
|
527 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
|
|
528 |
draw('vu', 'music_understanding', filter_1, 'llama3_70b_judge')
|
529 |
|
530 |
|
@@ -540,60 +580,10 @@ def under_development():
|
|
540 |
|
541 |
dataset_contents(dataset_diaplay_information[filter_1], 'under_development')
|
542 |
|
543 |
-
|
544 |
-
|
545 |
-
'''
|
546 |
-
Show Dataset Examples
|
547 |
-
'''
|
548 |
-
|
549 |
-
# Initialize a session state variable for toggling the chart visibility
|
550 |
-
if "show_dataset_examples" not in st.session_state:
|
551 |
-
st.session_state.show_dataset_examples = False
|
552 |
-
|
553 |
-
# Create a button to toggle visibility
|
554 |
-
if st.button("Show Dataset Examples"):
|
555 |
-
st.session_state.show_dataset_examples = not st.session_state.show_dataset_examples
|
556 |
-
|
557 |
-
if st.session_state.show_dataset_examples:
|
558 |
-
|
559 |
-
# st.markdown('To be implemented')
|
560 |
-
|
561 |
-
# # if dataset_name in ['Earnings21-Test', 'Earnings22-Test', 'Tedlium3-Test', 'Tedlium3-Long-form-Test']:
|
562 |
-
if filter_1 in []:
|
563 |
-
pass
|
564 |
-
else:
|
565 |
-
try:
|
566 |
-
show_dataset_examples(filter_1)
|
567 |
-
except:
|
568 |
-
st.markdown('To be implemented')
|
569 |
-
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
570 |
|
571 |
if filter_1 in wer_development_datasets:
|
572 |
draw('vu', 'under_development_wer', filter_1, 'wer')
|
573 |
|
574 |
elif filter_1 in non_wer_development_datasets:
|
575 |
draw('vu', 'under_development_llama3_70b_judge', filter_1, 'llama3_70b_judge')
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
def show_examples(data):
|
580 |
-
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
581 |
-
'''
|
582 |
-
Show Dataset Examples
|
583 |
-
'''
|
584 |
-
|
585 |
-
# Initialize a session state variable for toggling the chart visibility
|
586 |
-
if "show_dataset_examples" not in st.session_state:
|
587 |
-
st.session_state.show_dataset_examples = False
|
588 |
-
|
589 |
-
# Create a button to toggle visibility
|
590 |
-
if st.button("Show Dataset Examples"):
|
591 |
-
st.session_state.show_dataset_examples = not st.session_state.show_dataset_examples
|
592 |
-
|
593 |
-
if st.session_state.show_dataset_examples:
|
594 |
-
try:
|
595 |
-
show_dataset_examples(data)
|
596 |
-
except:
|
597 |
-
st.markdown('To be implemented')
|
598 |
-
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
599 |
-
|
|
|
119 |
```
|
120 |
""")
|
121 |
|
122 |
+
def show_examples_in_page(data):
|
123 |
+
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
124 |
+
'''
|
125 |
+
Show Dataset Examples
|
126 |
+
'''
|
127 |
+
|
128 |
+
# Initialize a session state variable for toggling the chart visibility
|
129 |
+
if "show_dataset_examples" not in st.session_state:
|
130 |
+
st.session_state.show_dataset_examples = False
|
131 |
+
|
132 |
+
# Create a button to toggle visibility
|
133 |
+
if st.button("Show Dataset Examples"):
|
134 |
+
st.session_state.show_dataset_examples = not st.session_state.show_dataset_examples
|
135 |
+
|
136 |
+
if st.session_state.show_dataset_examples:
|
137 |
+
try:
|
138 |
+
show_dataset_examples(data)
|
139 |
+
except:
|
140 |
+
st.markdown('To be implemented')
|
141 |
+
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
|
142 |
+
|
143 |
|
144 |
def asr_english():
|
145 |
st.title("Task: Automatic Speech Recognition - English")
|
|
|
158 |
sum_table_mulit_metrix('asr_english', ['wer'])
|
159 |
else:
|
160 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
161 |
+
show_examples_in_page(filter_1)
|
162 |
draw('su', 'asr_english', filter_1, 'wer', cus_sort=True)
|
163 |
|
164 |
|
|
|
179 |
sum_table_mulit_metrix('asr_singlish', ['wer'])
|
180 |
else:
|
181 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
182 |
+
show_examples_in_page(filter_1)
|
183 |
draw('su', 'asr_singlish', filter_1, 'wer')
|
184 |
|
185 |
|
|
|
200 |
sum_table_mulit_metrix('asr_mandarin', ['wer'])
|
201 |
else:
|
202 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
203 |
+
show_examples_in_page(filter_1)
|
204 |
draw('su', 'asr_mandarin', filter_1, 'wer')
|
205 |
|
206 |
|
|
|
221 |
sum_table_mulit_metrix('asr_malay', ['wer'])
|
222 |
else:
|
223 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
224 |
+
show_examples_in_page(filter_1)
|
225 |
draw('su', 'asr_malay', filter_1, 'wer')
|
226 |
|
227 |
|
|
|
242 |
sum_table_mulit_metrix('asr_tamil', ['wer'])
|
243 |
else:
|
244 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
245 |
+
show_examples_in_page(filter_1)
|
246 |
draw('su', 'asr_tamil', filter_1, 'wer')
|
247 |
|
248 |
|
|
|
263 |
sum_table_mulit_metrix('asr_indonesian', ['wer'])
|
264 |
else:
|
265 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
266 |
+
show_examples_in_page(filter_1)
|
267 |
draw('su', 'asr_indonesian', filter_1, 'wer')
|
268 |
|
269 |
|
|
|
284 |
sum_table_mulit_metrix('asr_thai', ['wer'])
|
285 |
else:
|
286 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
287 |
+
show_examples_in_page(filter_1)
|
288 |
draw('su', 'asr_thai', filter_1, 'wer')
|
289 |
|
290 |
|
|
|
305 |
sum_table_mulit_metrix('asr_vietnamese', ['wer'])
|
306 |
else:
|
307 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
308 |
+
show_examples_in_page(filter_1)
|
309 |
draw('su', 'asr_vietnamese', filter_1, 'wer')
|
310 |
|
311 |
|
|
|
326 |
sum_table_mulit_metrix('asr_private', ['wer'])
|
327 |
else:
|
328 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['wer'])
|
329 |
+
show_examples_in_page(filter_1)
|
330 |
draw('su', 'asr_private', filter_1, 'wer')
|
331 |
|
332 |
|
|
|
347 |
sum_table_mulit_metrix('st', ['bleu'])
|
348 |
else:
|
349 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['bleu'])
|
350 |
+
show_examples_in_page(filter_1)
|
351 |
draw('su', 'ST', filter_1, 'bleu')
|
352 |
|
353 |
|
|
|
373 |
|
374 |
else:
|
375 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
376 |
+
show_examples_in_page(filter_1)
|
377 |
draw('su', 'sqa_english', filter_1, 'llama3_70b_judge')
|
378 |
|
379 |
|
|
|
395 |
|
396 |
else:
|
397 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
398 |
+
show_examples_in_page(filter_1)
|
399 |
draw('su', 'sqa_singlish', filter_1, 'llama3_70b_judge')
|
400 |
|
401 |
|
|
|
417 |
|
418 |
else:
|
419 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
420 |
+
show_examples_in_page(filter_1)
|
421 |
draw('su', 'sds_singlish', filter_1, 'llama3_70b_judge')
|
422 |
|
423 |
|
|
|
438 |
sum_table_mulit_metrix('speech_instruction', ['llama3_70b_judge'])
|
439 |
else:
|
440 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
441 |
+
show_examples_in_page(filter_1)
|
442 |
draw('su', 'speech_instruction', filter_1, 'llama3_70b_judge')
|
443 |
|
444 |
|
|
|
458 |
|
459 |
if filter_1 or metric:
|
460 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info[metric.lower().replace('-', '_')])
|
461 |
+
show_examples_in_page(filter_1)
|
462 |
draw('asu', 'audio_captioning', filter_1, metric.lower().replace('-', '_'))
|
463 |
|
464 |
|
|
|
479 |
sum_table_mulit_metrix('audio_scene_question_answering', ['llama3_70b_judge'])
|
480 |
else:
|
481 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
482 |
+
show_examples_in_page(filter_1)
|
483 |
draw('asu', 'audio_scene_question_answering', filter_1, 'llama3_70b_judge')
|
484 |
|
485 |
|
|
|
500 |
sum_table_mulit_metrix('emotion_recognition', ['llama3_70b_judge'])
|
501 |
else:
|
502 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
503 |
+
show_examples_in_page(filter_1)
|
504 |
draw('vu', 'emotion_recognition', filter_1, 'llama3_70b_judge')
|
505 |
|
506 |
|
|
|
522 |
sum_table_mulit_metrix('accent_recognition', ['llama3_70b_judge'])
|
523 |
else:
|
524 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
525 |
+
show_examples_in_page(filter_1)
|
526 |
draw('vu', 'accent_recognition', filter_1, 'llama3_70b_judge')
|
527 |
|
528 |
|
|
|
543 |
sum_table_mulit_metrix('gender_recognition', ['llama3_70b_judge'])
|
544 |
else:
|
545 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
546 |
+
show_examples_in_page(filter_1)
|
547 |
draw('vu', 'gender_recognition', filter_1, 'llama3_70b_judge')
|
548 |
|
549 |
|
|
|
564 |
sum_table_mulit_metrix('music_understanding', ['llama3_70b_judge'])
|
565 |
else:
|
566 |
dataset_contents(dataset_diaplay_information[filter_1], metrics_info['llama3_70b_judge'])
|
567 |
+
show_examples_in_page(filter_1)
|
568 |
draw('vu', 'music_understanding', filter_1, 'llama3_70b_judge')
|
569 |
|
570 |
|
|
|
580 |
|
581 |
dataset_contents(dataset_diaplay_information[filter_1], 'under_development')
|
582 |
|
583 |
+
show_examples_in_page(filter_1)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
584 |
|
585 |
if filter_1 in wer_development_datasets:
|
586 |
draw('vu', 'under_development_wer', filter_1, 'wer')
|
587 |
|
588 |
elif filter_1 in non_wer_development_datasets:
|
589 |
draw('vu', 'under_development_llama3_70b_judge', filter_1, 'llama3_70b_judge')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|