Spaces:
Running
Running
import streamlit as st | |
from app.draw_diagram import * | |
from app.content import * | |
from app.summarization import * | |
def dataset_contents(dataset, metrics): | |
custom_css = """ | |
<style> | |
.my-dataset-info { | |
# background-color: #F9EBEA; | |
# padding: 10px; | |
color: #050505; | |
font-style: normal; | |
font-size: 8px; | |
height: auto; | |
} | |
</style> | |
""" | |
st.markdown(custom_css, unsafe_allow_html=True) | |
st.markdown(f"""<div class="my-dataset-info"> | |
<p><b>About this dataset</b>: {dataset}</p> | |
</div>""", unsafe_allow_html=True) | |
st.markdown(f"""<div class="my-dataset-info"> | |
<p><b>About this metric</b>: {metrics}</p> | |
</div>""", unsafe_allow_html=True) | |
def dashboard(): | |
with st.container(): | |
st.title("Leaderboard for AudioBench") | |
st.markdown(""" | |
[gh1]: https://github.com/AudioLLMs/AudioBench | |
[gh2]: https://github.com/AudioLLMs/AudioBench | |
**Toolkit:** [![GitHub Repo stars](https://img.shields.io/github/stars/AudioLLMs/AudioBench?style=social)][gh1] | | |
[**Research Paper**](https://arxiv.org/abs/2406.16020) | | |
**Resource for AudioLLMs:** [![GitHub Repo stars](https://img.shields.io/github/stars/AudioLLMs/Awesome-Audio-LLM?style=social)][gh2] | |
""") | |
st.markdown(""" | |
#### Recent updates | |
- **Jan. 2025**: Update the layout. | |
- **Dec. 2024**: Added MuChoMusic dataset for Music Understanding - MCQ Questions. From Paper: https://arxiv.org/abs/2408.01337. | |
- **Dec. 2024**: Singlish ASR task added! The datasets are available on [HF](https://huggingface.co/datasets/MERaLiON/MNSC). | |
- **Dec. 2024**: Updated layout and added support for comparison between models with similar sizes. 1) Reorganized layout for a better user experience. 2) Added performance summary for each task. | |
- **Aug. 2024**: Initial leaderboard is now online. | |
""") | |
st.divider() | |
st.markdown(""" | |
#### Evaluating Audio-based Large Language Models | |
- AudioBench is a comprehensive evaluation benchmark designed for general instruction-following audio large language models. | |
- AudioBench is an evaluation benchmark that we continually improve and maintain. | |
Below are the initial 26 datasets that are included in AudioBench. We are now exteneded to over 40 datasets and going to extend to more in the future. | |
""" | |
) | |
with st.container(): | |
st.markdown(''' | |
''') | |
st.markdown("###### :dart: Our Benchmark includes: ") | |
cols = st.columns(8) | |
cols[0].metric(label="Tasks", value=">8") | |
cols[1].metric(label="Datasets", value=">40") | |
cols[2].metric(label="Evaluated Models", value=">5") | |
st.divider() | |
with st.container(): | |
left_co, right_co = st.columns([1, 0.7]) | |
with left_co: | |
st.markdown(""" | |
##### Citations :round_pushpin: | |
``` | |
@article{wang2024audiobench, | |
title={AudioBench: A Universal Benchmark for Audio Large Language Models}, | |
author={Wang, Bin and Zou, Xunlong and Lin, Geyu and Sun, Shuo and Liu, Zhuohan and Zhang, Wenyu and Liu, Zhengyuan and Aw, AiTi and Chen, Nancy F}, | |
journal={arXiv preprint arXiv:2406.16020}, | |
year={2024} | |
} | |
``` | |
""") | |
def asr_english(): | |
st.title("Task: Automatic Speech Recognition - English") | |
sum = ['Overall'] | |
dataset_lists = [ | |
'LibriSpeech-Test-Clean', | |
'LibriSpeech-Test-Other', | |
'Common-Voice-15-En-Test', | |
'Peoples-Speech-Test', | |
'GigaSpeech-Test', | |
'Earnings21-Test', | |
'Earnings22-Test', | |
'Tedlium3-Test', | |
'Tedlium3-Long-form-Test', | |
] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('asr_english', ['wer']) | |
else: | |
dataset_contents(asr_datsets[filter_1], metrics['wer']) | |
draw('su', 'asr_english', filter_1, 'wer', cus_sort=True) | |
def asr_singlish(): | |
st.title("Task: Automatic Speech Recognition - Singlish") | |
sum = ['Overall'] | |
dataset_lists = [ | |
'IMDA-Part1-ASR-Test', | |
'IMDA-Part2-ASR-Test', | |
'IMDA-Part3-30s-ASR-Test', | |
'IMDA-Part4-30s-ASR-Test', | |
'IMDA-Part5-30s-ASR-Test', | |
'IMDA-Part6-30s-ASR-Test', | |
] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('asr_singlish', ['wer']) | |
else: | |
dataset_contents(singlish_asr_datasets[filter_1], metrics['wer']) | |
draw('su', 'asr_singlish', filter_1, 'wer') | |
def asr_mandarin(): | |
st.title("Task: Automatic Speech Recognition - Mandarin") | |
sum = ['Overall'] | |
dataset_lists = [ | |
'Aishell-ASR-ZH-Test', | |
] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('asr_mandarin', ['wer']) | |
else: | |
dataset_contents(cnasr_datasets[filter_1], metrics['wer']) | |
draw('su', 'asr_mandarin', filter_1, 'wer') | |
def speech_translation(): | |
st.title("Task: Speech Translation") | |
sum = ['Overall'] | |
dataset_lists = [ | |
'CoVoST2-EN-ID-test', | |
'CoVoST2-EN-ZH-test', | |
'CoVoST2-EN-TA-test', | |
'CoVoST2-ID-EN-test', | |
'CoVoST2-ZH-EN-test', | |
'CoVoST2-TA-EN-test'] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('st', ['bleu']) | |
else: | |
dataset_contents(spt_datasets[filter_1], metrics['bleu']) | |
draw('su', 'ST', filter_1, 'bleu') | |
def speech_question_answering_english(): | |
st.title("Task: Spoken Question Answering - English") | |
sum = ['Overall'] | |
dataset_lists = [ | |
'CN-College-Listen-MCQ-Test', | |
'DREAM-TTS-MCQ-Test', | |
'SLUE-P2-SQA5-Test', | |
'Public-SG-Speech-QA-Test', | |
'Spoken-Squad-Test', | |
] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('sqa_english', ['llama3_70b_judge']) | |
#elif filter_1 in dataset_lists: | |
# dataset_contents(sqa_datasets[filter_1], metrics['llama3_70b_judge']) | |
# draw('su', 'SQA', filter_1, 'llama3_70b_judge') | |
else: | |
dataset_contents(sqa_datasets[filter_1], metrics['llama3_70b_judge']) | |
draw('su', 'sqa_english', filter_1, 'llama3_70b_judge') | |
def speech_question_answering_singlish(): | |
st.title("Task: Spoken Question Answering - Singlish") | |
sum = ['Overall'] | |
dataset_lists = [ | |
'MNSC-PART3-SQA', | |
'MNSC-PART4-SQA', | |
'MNSC-PART5-SQA', | |
'MNSC-PART6-SQA', | |
] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('sqa_singlish', ['llama3_70b_judge']) | |
else: | |
dataset_contents(sqa_datasets[filter_1], metrics['llama3_70b_judge']) | |
draw('su', 'sqa_singlish', filter_1, 'llama3_70b_judge') | |
def speech_instruction(): | |
st.title("Task: Speech Instruction") | |
sum = ['Overall'] | |
dataset_lists = ['OpenHermes-Audio-Test', | |
'ALPACA-Audio-Test', | |
] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('speech_instruction', ['llama3_70b_judge']) | |
else: | |
dataset_contents(si_datasets[filter_1], metrics['llama3_70b_judge']) | |
draw('su', 'speech_instruction', filter_1, 'llama3_70b_judge') | |
def audio_captioning(): | |
st.title("Task: Audio Captioning") | |
filters_levelone = ['WavCaps-Test', | |
'AudioCaps-Test', | |
] | |
filters_leveltwo = ['Llama3-70b-judge', 'Meteor'] | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
with middle: | |
metric = st.selectbox('Metric', filters_leveltwo) | |
if filter_1 or metric: | |
dataset_contents(ac_datasets[filter_1], metrics[metric.lower().replace('-', '_')]) | |
draw('asu', 'audio_captioning', filter_1, metric.lower().replace('-', '_')) | |
def audio_scene_question_answering(): | |
st.title("Task: Audio Scene Question Answering") | |
sum = ['Overall'] | |
dataset_lists = ['Clotho-AQA-Test', | |
'WavCaps-QA-Test', | |
'AudioCaps-QA-Test'] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('audio_scene_question_answering', ['llama3_70b_judge']) | |
else: | |
dataset_contents(asqa_datasets[filter_1], metrics['llama3_70b_judge']) | |
draw('asu', 'audio_scene_question_answering', filter_1, 'llama3_70b_judge') | |
def emotion_recognition(): | |
st.title("Task: Emotion Recognition") | |
sum = ['Overall'] | |
dataset_lists = [ | |
'IEMOCAP-Emotion-Test', | |
'MELD-Sentiment-Test', | |
'MELD-Emotion-Test', | |
] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('emotion_recognition', ['llama3_70b_judge']) | |
else: | |
dataset_contents(er_datasets[filter_1], metrics['llama3_70b_judge']) | |
draw('vu', 'emotion_recognition', filter_1, 'llama3_70b_judge') | |
def accent_recognition(): | |
st.title("Task: Accent Recognition") | |
sum = ['Overall'] | |
dataset_lists = ['VoxCeleb-Accent-Test'] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('accent_recognition', ['llama3_70b_judge']) | |
else: | |
dataset_contents(ar_datsets[filter_1], metrics['llama3_70b_judge']) | |
draw('vu', 'accent_recognition', filter_1, 'llama3_70b_judge') | |
def gender_recognition(): | |
st.title("Task: Gender Recognition") | |
sum = ['Overall'] | |
dataset_lists = ['VoxCeleb-Gender-Test', | |
'IEMOCAP-Gender-Test'] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('gender_recognition', ['llama3_70b_judge']) | |
else: | |
dataset_contents(gr_datasets[filter_1], metrics['llama3_70b_judge']) | |
draw('vu', 'gender_recognition', filter_1, 'llama3_70b_judge') | |
def music_understanding(): | |
st.title("Task: Music Understanding - MCQ Questions") | |
sum = ['Overall'] | |
dataset_lists = ['MuChoMusic-Test', | |
] | |
filters_levelone = sum + dataset_lists | |
left, center, _, middle, right = st.columns([0.4, 0.2, 0.2, 0.2 ,0.2]) | |
with left: | |
filter_1 = st.selectbox('Dataset', filters_levelone) | |
if filter_1: | |
if filter_1 in sum: | |
sum_table_mulit_metrix('music_understanding', ['llama3_70b_judge']) | |
else: | |
dataset_contents(MUSIC_MCQ_DATASETS[filter_1], metrics['llama3_70b_judge']) | |
draw('vu', 'music_understanding', filter_1, 'llama3_70b_judge') | |