Commit ·
e7185a2
1
Parent(s): 43efa17
added React app files for testing, build commands added to the readme.md metadata
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitignore +23 -20
- README.md +139 -45
- eslint.config.js +33 -0
- index.html +13 -0
- package-lock.json +0 -0
- package.json +40 -32
- public/Access_token.png +3 -0
- public/Backend1.png +3 -0
- public/Backend2.png +3 -0
- public/Backend3.png +3 -0
- public/Backend4.png +3 -0
- public/CF1.png +3 -0
- public/CF_Leaderboard.png +3 -0
- public/CF_home.png +3 -0
- public/Dataset.png +3 -0
- public/Github_logo.png +3 -0
- public/LBoard.png +3 -0
- public/Logo_small.png +3 -0
- public/Print_Results.pdf +3 -0
- public/Req_home.png +3 -0
- public/Req_result.png +3 -0
- public/Req_result2.png +3 -0
- public/Req_result3.png +3 -0
- public/Url_app.png +3 -0
- public/clone_repo.png +3 -0
- public/ngrok_token.png +3 -0
- public/vite.svg +1 -0
- src/App.css +12 -27
- src/App.jsx +189 -0
- src/DataContext.jsx +13 -0
- src/Utils/helper.js +12 -0
- src/assets/ASR_HeadImg.svg +0 -0
- src/assets/Age_group.png +3 -0
- src/assets/Cluster.png +3 -0
- src/assets/Dataset_table.png +3 -0
- src/assets/Dataset_tableHQ.png +3 -0
- src/assets/Ethnicity.png +3 -0
- src/assets/FAW.png +3 -0
- src/assets/Logo_new.png +3 -0
- src/assets/Logo_noBG.png +3 -0
- src/assets/SEG_group.png +3 -0
- src/assets/illustration-your-users.svg +1 -0
- src/assets/logo.png +3 -0
- src/assets/main_LOGO.png +3 -0
- src/assets/main_LOGO2.png +3 -0
- src/assets/react.svg +1 -0
- src/components/Contact.jsx +86 -0
- src/components/Dataset.jsx +127 -0
- src/components/Home.jsx +53 -0
- src/components/Leaderboard.jsx +152 -0
.gitignore
CHANGED
|
@@ -1,23 +1,26 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
/node_modules
|
| 5 |
-
/.pnp
|
| 6 |
-
.pnp.js
|
| 7 |
-
|
| 8 |
-
# testing
|
| 9 |
-
/coverage
|
| 10 |
-
|
| 11 |
-
# production
|
| 12 |
-
/build
|
| 13 |
-
|
| 14 |
-
# misc
|
| 15 |
-
.DS_Store
|
| 16 |
-
.env.local
|
| 17 |
-
.env.development.local
|
| 18 |
-
.env.test.local
|
| 19 |
-
.env.production.local
|
| 20 |
-
|
| 21 |
npm-debug.log*
|
| 22 |
yarn-debug.log*
|
| 23 |
yarn-error.log*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Logs
|
| 2 |
+
logs
|
| 3 |
+
*.log
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
npm-debug.log*
|
| 5 |
yarn-debug.log*
|
| 6 |
yarn-error.log*
|
| 7 |
+
pnpm-debug.log*
|
| 8 |
+
lerna-debug.log*
|
| 9 |
+
|
| 10 |
+
node_modules
|
| 11 |
+
dist
|
| 12 |
+
dist-ssr
|
| 13 |
+
*.local
|
| 14 |
+
*.env
|
| 15 |
+
.gitignore
|
| 16 |
+
|
| 17 |
+
# Editor directories and files
|
| 18 |
+
.vscode/*
|
| 19 |
+
!.vscode/extensions.json
|
| 20 |
+
.idea
|
| 21 |
+
.DS_Store
|
| 22 |
+
*.suo
|
| 23 |
+
*.ntvs*
|
| 24 |
+
*.njsproj
|
| 25 |
+
*.sln
|
| 26 |
+
*.sw?
|
README.md
CHANGED
|
@@ -1,82 +1,176 @@
|
|
| 1 |
---
|
| 2 |
-
title: Static React App
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
## Available Scripts
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
| 24 |
-
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
|
| 25 |
|
| 26 |
-
|
| 27 |
-
You may also see any lint errors in the console.
|
| 28 |
|
| 29 |
-
|
| 30 |
|
| 31 |
-
|
| 32 |
-
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
| 33 |
|
| 34 |
-
##
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
| 38 |
|
| 39 |
-
|
| 40 |
-
Your app is ready to be deployed!
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
### `npm run eject`
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
| 51 |
|
| 52 |
-
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
|
|
|
|
|
|
|
| 57 |
|
| 58 |
-
|
| 59 |
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
|
| 62 |
-
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
-
|
|
|
|
| 67 |
|
| 68 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
|
| 70 |
-
|
| 71 |
|
| 72 |
-
###
|
| 73 |
|
| 74 |
-
|
| 75 |
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Static React Vite App ASR FairBench
|
| 3 |
+
emoji: 🐨
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
short_description: Static vite app with React
|
| 9 |
+
app_build_command: "npm run build"
|
| 10 |
+
app_file: "dist/index.html"
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# ASR LEADERBOARD [[Link]](https://satyamr196-asr-fairbench.static.hf.space)
|
| 14 |
|
| 15 |
+
## Screenshots
|
| 16 |
+

|
| 17 |
+

|
| 18 |
+

|
| 19 |
+

|
| 20 |
+

|
| 21 |
+

|
| 22 |
|
|
|
|
| 23 |
|
| 24 |
+
### Features
|
| 25 |
|
| 26 |
+
- **Intuitive UI** – A simple, clean, and visually appealing interface
|
| 27 |
+
- **Fast Model Auditing** – Submit a model and get audited within minutes.
|
| 28 |
+
- **Graphical Insight**s – Results are visualized using box plots and histograms, which can be exported as PDF. [📄Download Result PDF](public/Print_Results.pdf)
|
| 29 |
+
- **Leaderboard Publishing** – Publish audited results to a dynamic leaderboard.
|
| 30 |
+
- **Advanced Leaderboard Features** – Filter by model name, sort by any column, and export data as CSV or PDF.
|
| 31 |
+
- **Optimized Frontend Performance** – Configured the React.js frontend to improve initial load time by 30–50%.
|
| 32 |
+
- **Efficient Backend Processing** – Built with Flask and runs on Google Colab, utilizing GPUs for fast LLM inference.
|
| 33 |
+
- **Fully Reproducible** – The application can be replicated from the GitHub codebase by following the provided instructions.
|
| 34 |
+
- **Deployment** – Application is deployed on Hugging Face Spaces for broader accessibility. [[Link]](https://huggingface.co/spaces/satyamr196/ASR-FairBench)
|
| 35 |
|
| 36 |
+
### Tech Stack
|
|
|
|
| 37 |
|
| 38 |
+
**Client:** React, Vite, PrimeReact UI, Styled Components, Axios, Recharts, React Router, React-Plotly, React-katex
|
|
|
|
| 39 |
|
| 40 |
+
**Server(Using Docker):** Flask, Python, Hugging Face Transformers, Hugging Face Hub, Hugging Face Dataset, NumPy, Pandas, gunicorn, torch, statsmodels
|
| 41 |
|
| 42 |
+
**Server(Using Google Colab):** Flask, Colab, Ngrok ,Python, PyMongo, Hugging Face Transformers, NumPy, Pandas, torch, statsmodels
|
|
|
|
| 43 |
|
| 44 |
+
## API Reference
|
| 45 |
|
| 46 |
+
#### Welcome message
|
| 47 |
+
```http
|
| 48 |
+
GET /
|
| 49 |
+
```
|
| 50 |
|
| 51 |
+
#### Run Audit for Huggin Face ASR model
|
|
|
|
| 52 |
|
| 53 |
+
```http
|
| 54 |
+
GET /api?ASR_model=<HF_model_name>
|
| 55 |
+
```
|
| 56 |
+
Example :
|
| 57 |
+
```
|
| 58 |
+
{baseUrl}/api?ASR_model=openai/whisper-medium
|
| 59 |
+
```
|
| 60 |
+
#### Get leaderboard data
|
| 61 |
+
```http
|
| 62 |
+
GET /fetch
|
| 63 |
+
```
|
| 64 |
+
#### Insert generated leaderboard data to database
|
| 65 |
+
```http
|
| 66 |
+
POST /insert
|
| 67 |
+
```
|
| 68 |
|
|
|
|
| 69 |
|
| 70 |
+
## Run Locally
|
| 71 |
+
#### <u>Prerequisites</u> :
|
| 72 |
+
- **Node.js**: Make sure you have Node.js v22.12.0 or higher installed on your machine. You can download it from [Node.js official website](https://nodejs.org/).
|
| 73 |
+
- **Docker**: You are required to install Docker Desktop [(Link 1)](https://www.docker.com/products/docker-desktop/) [(Link 2)](https://docs.docker.com/get-started/get-docker/) to build and run docker container on your system.(Method 1)
|
| 74 |
+
- **Google Colab**: You will need a Google account to access Google Colab.(Method 2)
|
| 75 |
+
- **Ngrok**: Sign up for a free account on [ngrok](https://ngrok.com/) to expose your local server to the internet.(Method 2)
|
| 76 |
|
| 77 |
+
### <u>Frontend</u> :
|
| 78 |
|
| 79 |
+
Clone the project from GitHub to your local machine.
|
| 80 |
|
| 81 |
+
```bash
|
| 82 |
+
git clone https://github.com/SatyamR196/ASR-FairBench.git
|
| 83 |
+
```
|
| 84 |
|
| 85 |
+
Go to the project directory
|
| 86 |
|
| 87 |
+
```bash
|
| 88 |
+
cd ASR-FairBench
|
| 89 |
+
```
|
| 90 |
|
| 91 |
+
Install dependencies
|
| 92 |
|
| 93 |
+
```bash
|
| 94 |
+
npm install
|
| 95 |
+
```
|
| 96 |
|
| 97 |
+
Start the react app
|
| 98 |
|
| 99 |
+
```bash
|
| 100 |
+
npm run dev
|
| 101 |
+
```
|
| 102 |
+
On running above instructions sucessfully, following message with website link should should appear in the terminal:
|
| 103 |
|
| 104 |
+
<img src="/public/CF1.png" alt="Project Logo" width="400">
|
| 105 |
+
Now you can open the link in the web browser, home page will look something like this :
|
| 106 |
|
| 107 |
+
<!-- <img src="/public/CF_home.png" alt="Project Logo" width="100%"> -->
|
| 108 |
+

|
| 109 |
+
<!-- <img src="/public/CF_Leaderboard.png" alt="Project Logo" width="100%"> -->
|
| 110 |
+

|
| 111 |
+
##### Congratulations 🤗 ! on sucessfully cloning the frontend, next we will be setting up the backend on google colab
|
| 112 |
|
| 113 |
+
### <u>Backend</u> :
|
| 114 |
|
| 115 |
+
#### <i><u>Method 1</u></i> : Using Docker + Hugging Face
|
| 116 |
|
| 117 |
+
- Create account on hugging face and also generate acess token with read and write permission.
|
| 118 |
|
| 119 |
+

|
| 120 |
|
| 121 |
+
- Then you can selet either clone the repository or duplicate the space option to create your own space.
|
| 122 |
|
| 123 |
+

|
| 124 |
|
| 125 |
+
- Then your server will be running on hugging face space. You can access the server clicking on 3 dots icon and then select "embed this space" option.
|
| 126 |
+
|
| 127 |
+
- You can also run the server locally using docker. For that you need to install docker on your system. Then select the "Run locally" option as shown in above image.
|
| 128 |
+
|
| 129 |
+
- Finally paste the server link in the frontend code > App.jsx > baseUrl. Now frontend will be able to access the backend server.
|
| 130 |
+
|
| 131 |
+

|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
#### <i><u>Method 2</u></i> : Using Google Colab
|
| 135 |
+
- Open the Google Colab notebook using the link below.
|
| 136 |
+
|
| 137 |
+
Link to Backend Server Collab notebook : <a href="https://colab.research.google.com/drive/1nIA8IyejvuRauvFbOCbpRlN1sEIK01Gh#scrollTo=_bZc5hkTEfWE"> Click here </a>
|
| 138 |
+
|
| 139 |
+
- Open your google drive, Create a folder named "ASR_Fairness_Dataset" and upload the above colab notebook there.
|
| 140 |
+
|
| 141 |
+
- You also need to upload the dataset to your google drive. Download the dataset from the link below, name it "asr_fairness_audio" and upload it to the same folder "ASR_Fairness_Dataset" in your google drive. [Dataset Link](https://drive.google.com/drive/folders/1lTT8NF9hVRpO4NYrn2qV8dNTmP9CNtVG)
|
| 142 |
+
|
| 143 |
+
- Additionally, you can also download the CSV files which contains the results of the ASR models on the dataset. You need to place the folders in the folder "ASR_Fairness_Dataset" in your google drive.
|
| 144 |
+
[OpenAi Model Result Link](https://drive.google.com/drive/folders/1mWnlz4wIfIYkxOLB8zjfta62Eg9ZaB4P?usp=drive_link)
|
| 145 |
+
[Facebook Model Result Link](https://drive.google.com/drive/folders/1-VDnwbLPDrUWdw67x-KUYYQ46PFT5lbd?usp=drive_link)
|
| 146 |
+
|
| 147 |
+
- finally, you need to download the test.csv file which contains the details about audio dataset like gender,ethnicity,etc. You need to place the folders in the folder "ASR_Fairness_Dataset" in your google drive.
|
| 148 |
+
[test.csv Link](https://drive.google.com/file/d/1-54UJWB7g9pXB8t5X6wYdBA_KClRIgLf/view?usp=drive_link)
|
| 149 |
+
|
| 150 |
+
- Now, your drive folder structure should look like this :
|
| 151 |
+

|
| 152 |
+
|
| 153 |
+
- Before running the Backend server on colab notebook, make sure to sign up on ngrok and get your auth token and replace it in colab notebook. [Ngok Website](https://dashboard.ngrok.com/get-started/your-authtoken)
|
| 154 |
+

|
| 155 |
+
|
| 156 |
+
```bash
|
| 157 |
+
!ngrok config add-authtoken <YOUR NGROK TOKEN>
|
| 158 |
+
```
|
| 159 |
+
|
| 160 |
+
- Now, run the colab notebook. It will ask for permission to access your google drive, allow it.
|
| 161 |
+
|
| 162 |
+
- After running the notebook, ngok will give you a public url to access the backend server api. Copy the link and paste it in the frontend code, App.jsx , baseUrl.
|
| 163 |
+

|
| 164 |
+
|
| 165 |
+
**Note :** If you change the name of any the folder, make sure to change the path in the colab notebook as well.
|
| 166 |
+
|
| 167 |
+
##### Sucessful 🤗 ! now you can run the application on your local machine
|
| 168 |
+
|
| 169 |
+
### Feedback & Support
|
| 170 |
+
|
| 171 |
+
If you have any feedback or need support, feel free to reach out to us:
|
| 172 |
+
|
| 173 |
+
- **Anand Rai**: [raianand.1991@gmail.com](mailto:raianand.1991@gmail.com)
|
| 174 |
+
- **Prof. Animesh Mukherjee**: [animeshm@gmail.com](mailto:animeshm@gmail.com)
|
| 175 |
+
- **Satyam Rahangdale**: [satyamrahangdale196@gmail.com](mailto:satyamrahangdale196@gmail.com)
|
| 176 |
+
- **Utkarsh Anand**: [ua28012006@gmail.com](mailto:ua28012006@gmail.com)
|
eslint.config.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import js from '@eslint/js'
|
| 2 |
+
import globals from 'globals'
|
| 3 |
+
import reactHooks from 'eslint-plugin-react-hooks'
|
| 4 |
+
import reactRefresh from 'eslint-plugin-react-refresh'
|
| 5 |
+
|
| 6 |
+
export default [
|
| 7 |
+
{ ignores: ['dist'] },
|
| 8 |
+
{
|
| 9 |
+
files: ['**/*.{js,jsx}'],
|
| 10 |
+
languageOptions: {
|
| 11 |
+
ecmaVersion: 2020,
|
| 12 |
+
globals: globals.browser,
|
| 13 |
+
parserOptions: {
|
| 14 |
+
ecmaVersion: 'latest',
|
| 15 |
+
ecmaFeatures: { jsx: true },
|
| 16 |
+
sourceType: 'module',
|
| 17 |
+
},
|
| 18 |
+
},
|
| 19 |
+
plugins: {
|
| 20 |
+
'react-hooks': reactHooks,
|
| 21 |
+
'react-refresh': reactRefresh,
|
| 22 |
+
},
|
| 23 |
+
rules: {
|
| 24 |
+
...js.configs.recommended.rules,
|
| 25 |
+
...reactHooks.configs.recommended.rules,
|
| 26 |
+
'no-unused-vars': ['error', { varsIgnorePattern: '^[A-Z_]' }],
|
| 27 |
+
'react-refresh/only-export-components': [
|
| 28 |
+
'warn',
|
| 29 |
+
{ allowConstantExport: true },
|
| 30 |
+
],
|
| 31 |
+
},
|
| 32 |
+
},
|
| 33 |
+
]
|
index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!doctype html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8" />
|
| 5 |
+
<link rel="icon" type="image/png" href="/Logo_small.png" />
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
| 7 |
+
<title>ASR-FairBench</title>
|
| 8 |
+
</head>
|
| 9 |
+
<body>
|
| 10 |
+
<div id="root"></div>
|
| 11 |
+
<script type="module" src="/src/main.jsx"></script>
|
| 12 |
+
</body>
|
| 13 |
+
</html>
|
package-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
package.json
CHANGED
|
@@ -1,39 +1,47 @@
|
|
| 1 |
{
|
| 2 |
-
"name": "
|
| 3 |
-
"version": "0.1.0",
|
| 4 |
"private": true,
|
| 5 |
-
"
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
"@testing-library/react": "^16.3.0",
|
| 9 |
-
"@testing-library/user-event": "^13.5.0",
|
| 10 |
-
"react": "^19.1.0",
|
| 11 |
-
"react-dom": "^19.1.0",
|
| 12 |
-
"react-scripts": "5.0.1",
|
| 13 |
-
"web-vitals": "^2.1.4"
|
| 14 |
-
},
|
| 15 |
"scripts": {
|
| 16 |
-
"
|
| 17 |
-
"build": "
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
},
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
},
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
"
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
]
|
| 38 |
}
|
| 39 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"name": "frontend",
|
|
|
|
| 3 |
"private": true,
|
| 4 |
+
"proxy": "http://localhost:3000",
|
| 5 |
+
"version": "0.0.0",
|
| 6 |
+
"type": "module",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
"scripts": {
|
| 8 |
+
"dev": "vite",
|
| 9 |
+
"build": "vite build",
|
| 10 |
+
"lint": "eslint .",
|
| 11 |
+
"preview": "vite preview"
|
| 12 |
},
|
| 13 |
+
"dependencies": {
|
| 14 |
+
"axios": "^1.8.4",
|
| 15 |
+
"chart.js": "^4.4.8",
|
| 16 |
+
"jspdf": "^3.0.1",
|
| 17 |
+
"jspdf-autotable": "^5.0.2",
|
| 18 |
+
"katex": "^0.16.22",
|
| 19 |
+
"lucide-react": "^0.485.0",
|
| 20 |
+
"mongodb": "^6.15.0",
|
| 21 |
+
"plotly.js": "^3.0.1",
|
| 22 |
+
"primeflex": "^4.0.0",
|
| 23 |
+
"primeicons": "^7.0.0",
|
| 24 |
+
"primereact": "^10.9.3",
|
| 25 |
+
"react": "^19.0.0",
|
| 26 |
+
"react-d3-speedometer": "^3.1.1",
|
| 27 |
+
"react-dom": "^19.0.0",
|
| 28 |
+
"react-hook-form": "^7.54.2",
|
| 29 |
+
"react-katex": "^3.1.0",
|
| 30 |
+
"react-plotly.js": "^2.6.0",
|
| 31 |
+
"react-router-dom": "^7.4.0",
|
| 32 |
+
"react-to-print": "^3.1.0",
|
| 33 |
+
"recharts": "^2.15.1",
|
| 34 |
+
"styled-components": "^6.1.16"
|
| 35 |
},
|
| 36 |
+
"devDependencies": {
|
| 37 |
+
"@eslint/js": "^9.21.0",
|
| 38 |
+
"@types/react": "^19.0.10",
|
| 39 |
+
"@types/react-dom": "^19.0.4",
|
| 40 |
+
"@vitejs/plugin-react": "^4.3.4",
|
| 41 |
+
"eslint": "^9.21.0",
|
| 42 |
+
"eslint-plugin-react-hooks": "^5.1.0",
|
| 43 |
+
"eslint-plugin-react-refresh": "^0.4.19",
|
| 44 |
+
"globals": "^15.15.0",
|
| 45 |
+
"vite": "^6.2.4"
|
|
|
|
| 46 |
}
|
| 47 |
}
|
public/Access_token.png
ADDED
|
Git LFS Details
|
public/Backend1.png
ADDED
|
Git LFS Details
|
public/Backend2.png
ADDED
|
Git LFS Details
|
public/Backend3.png
ADDED
|
Git LFS Details
|
public/Backend4.png
ADDED
|
Git LFS Details
|
public/CF1.png
ADDED
|
Git LFS Details
|
public/CF_Leaderboard.png
ADDED
|
Git LFS Details
|
public/CF_home.png
ADDED
|
Git LFS Details
|
public/Dataset.png
ADDED
|
Git LFS Details
|
public/Github_logo.png
ADDED
|
Git LFS Details
|
public/LBoard.png
ADDED
|
Git LFS Details
|
public/Logo_small.png
ADDED
|
Git LFS Details
|
public/Print_Results.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a8cabdd57709db052244a452f583e05f71fcd5e610622d618f8cf479633cce05
|
| 3 |
+
size 1267188
|
public/Req_home.png
ADDED
|
Git LFS Details
|
public/Req_result.png
ADDED
|
Git LFS Details
|
public/Req_result2.png
ADDED
|
Git LFS Details
|
public/Req_result3.png
ADDED
|
Git LFS Details
|
public/Url_app.png
ADDED
|
Git LFS Details
|
public/clone_repo.png
ADDED
|
Git LFS Details
|
public/ngrok_token.png
ADDED
|
Git LFS Details
|
public/vite.svg
ADDED
|
|
src/App.css
CHANGED
|
@@ -1,34 +1,18 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
}
|
| 4 |
-
|
| 5 |
-
.App-logo {
|
| 6 |
-
height: 40vmin;
|
| 7 |
-
pointer-events: none;
|
| 8 |
-
}
|
| 9 |
-
|
| 10 |
-
@media (prefers-reduced-motion: no-preference) {
|
| 11 |
-
.App-logo {
|
| 12 |
-
animation: App-logo-spin infinite 20s linear;
|
| 13 |
-
}
|
| 14 |
-
}
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
align-items: center;
|
| 22 |
-
justify-content: center;
|
| 23 |
-
font-size: calc(10px + 2vmin);
|
| 24 |
-
color: white;
|
| 25 |
}
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
}
|
| 30 |
|
| 31 |
-
@keyframes
|
| 32 |
from {
|
| 33 |
transform: rotate(0deg);
|
| 34 |
}
|
|
@@ -36,3 +20,4 @@
|
|
| 36 |
transform: rotate(360deg);
|
| 37 |
}
|
| 38 |
}
|
|
|
|
|
|
| 1 |
+
@import 'primeicons/primeicons.css';
|
| 2 |
+
@import 'primeflex/primeflex.css';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
+
#root {
|
| 5 |
+
/* max-width: 1280px; */
|
| 6 |
+
margin: 0 auto;
|
| 7 |
+
padding: 0rem;
|
| 8 |
+
text-align: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
+
html,body{
|
| 11 |
+
margin: 0;
|
| 12 |
+
padding: 0;
|
| 13 |
}
|
| 14 |
|
| 15 |
+
@keyframes logo-spin {
|
| 16 |
from {
|
| 17 |
transform: rotate(0deg);
|
| 18 |
}
|
|
|
|
| 20 |
transform: rotate(360deg);
|
| 21 |
}
|
| 22 |
}
|
| 23 |
+
|
src/App.jsx
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { useState } from "react";
|
| 2 |
+
import { media } from "./Utils/helper.js";
|
| 3 |
+
// import "primereact/resources/themes/lara-light-cyan/theme.css";
|
| 4 |
+
import './App.css'
|
| 5 |
+
import "primereact/resources/themes/lara-light-cyan/theme.css";
|
| 6 |
+
// import "primereact/resources/themes/bootstrap4-light-blue/theme.css"
|
| 7 |
+
import axios from "axios";
|
| 8 |
+
import {
|
| 9 |
+
Routes,
|
| 10 |
+
Route,
|
| 11 |
+
Navigate,
|
| 12 |
+
useLocation
|
| 13 |
+
} from "react-router-dom";
|
| 14 |
+
import { Home } from "./components/Home";
|
| 15 |
+
import { Request } from "./components/Request";
|
| 16 |
+
import { Leaderboard } from "./components/Leaderboard";
|
| 17 |
+
import Nav from "./styled_components/Nav";
|
| 18 |
+
import styled from "styled-components";
|
| 19 |
+
import { Toast } from "primereact/toast";
|
| 20 |
+
import { React, useRef, useEffect } from "react";
|
| 21 |
+
import { useContext } from "react";
|
| 22 |
+
import { DataContext } from "./DataContext";
|
| 23 |
+
import Logo from "./assets/logo.png"
|
| 24 |
+
import Metrics from "./components/Metrics";
|
| 25 |
+
import Dataset from "./components/Dataset";
|
| 26 |
+
import Contact from "./components/Contact";
|
| 27 |
+
import ProgressToast from "./styled_components/ProgressToast";
|
| 28 |
+
import SpinnerIcon from "./styled_components/SpinnerIcon";
|
| 29 |
+
import { Password } from 'primereact/password';
|
| 30 |
+
|
| 31 |
+
function App() {
|
| 32 |
+
const toast = useRef(null);
|
| 33 |
+
const [baseUrl, setBaseUrl] = useState("https://satyamr196-asr-fairbench-sever-v2.hf.space")
|
| 34 |
+
// const [baseUrl,setBaseUrl] = useState("http://localhost:7860")
|
| 35 |
+
console.log(baseUrl);
|
| 36 |
+
const location = useLocation();
|
| 37 |
+
|
| 38 |
+
const showSucess = () => {//For toast
|
| 39 |
+
toast.current.show({ severity: 'success', summary: 'Success', detail: 'Model added to Leaderboard 🤗' });
|
| 40 |
+
};
|
| 41 |
+
const showError = () => {//For toast
|
| 42 |
+
toast.current.show({ severity: 'error', summary: 'Error', detail: 'Error adding model to Leaderboard 🥹' });
|
| 43 |
+
};
|
| 44 |
+
const showInfo = () => {//For toast
|
| 45 |
+
toast.current.show({ severity: 'info', summary: 'Info', detail: 'Model already added to the Leaderboard 🫢' });
|
| 46 |
+
};
|
| 47 |
+
return (
|
| 48 |
+
<>
|
| 49 |
+
<Wrapper>
|
| 50 |
+
<Toast ref={toast} />
|
| 51 |
+
<HeadImg>
|
| 52 |
+
<img src={Logo}></img>
|
| 53 |
+
</HeadImg>
|
| 54 |
+
<Text>
|
| 55 |
+
🎙️ <b>ASR-FAIRBENCH</b> is an open benchmarking platform dedicated to evaluating the <b>fairness and accuracy</b> of Automatic Speech Recognition (ASR) models.
|
| 56 |
+
Our mission is to assess ASR models' performance across diverse demographic groups using the <b><a href="https://ai.meta.com/datasets/speech-fairness-dataset/" target="_blank">Fair Speech Dataset</a></b>.
|
| 57 |
+
|
| 58 |
+
Models are ranked based on the <b>Fairness Adjusted Accuracy Score (FAAS)</b>, which integrates both <b>Word Error Rate (WER)</b> and a <b>Fairness Score</b>, ensuring that models deliver equitable performance across different accents, genders, and age groups.
|
| 59 |
+
|
| 60 |
+
Explore the 📈 <b>Metrics</b> tab for details on our evaluation process and visit the 📂 <b>Dataset</b> tab for a summary of the Fair Speech Dataset.
|
| 61 |
+
|
| 62 |
+
Think your ASR model is both inclusive and high-performing? Put it to the test and claim your spot on the leaderboard! ✨
|
| 63 |
+
<b>📄<a href="http://arxiv.org/abs/2505.11572" target="_blank">(Paper Link)</a> </b>
|
| 64 |
+
<b><i className="pi pi-github"></i> <a href="https://github.com/SatyamR196/ASR-FairBench" target="_blank">(Github Link)</a></b>
|
| 65 |
+
</Text>
|
| 66 |
+
<div className="container">
|
| 67 |
+
<Nav />
|
| 68 |
+
<Routes>
|
| 69 |
+
<Route path="/home" element={<Home baseUrl={baseUrl} />} />
|
| 70 |
+
<Route path="/request" element={<Request showSucess={showSucess} showError={showError} showInfo={showInfo} baseUrl={baseUrl} />} />
|
| 71 |
+
<Route path="/leaderboard" element={<Leaderboard baseUrl={baseUrl} />} />
|
| 72 |
+
<Route path="/metrics" element={<Metrics />} />
|
| 73 |
+
<Route path="/dataset" element={<Dataset />} />
|
| 74 |
+
<Route path="/contact" element={<Contact />} />
|
| 75 |
+
<Route path="/*" element={<Navigate to="/leaderboard" />} />
|
| 76 |
+
</Routes>
|
| 77 |
+
</div>
|
| 78 |
+
</Wrapper>
|
| 79 |
+
|
| 80 |
+
<div style={{ display: location.pathname === "/request" ? "block" : "none" }}>
|
| 81 |
+
<ProgressToast baseUrl={baseUrl} />
|
| 82 |
+
</div>
|
| 83 |
+
</>
|
| 84 |
+
);
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
const HeadImg = styled.div`
|
| 88 |
+
display: flex;
|
| 89 |
+
justify-content: center; // Centers the image horizontally
|
| 90 |
+
align-items: center; // Aligns image vertically
|
| 91 |
+
width: 100%;
|
| 92 |
+
margin: 1rem 0 0 0;
|
| 93 |
+
|
| 94 |
+
img {
|
| 95 |
+
max-width: 300px; // Adjust size as needed
|
| 96 |
+
height: auto; // Maintain aspect ratio
|
| 97 |
+
}
|
| 98 |
+
`
|
| 99 |
+
const Text = styled.p`
|
| 100 |
+
/* color: gray; */
|
| 101 |
+
color: #4b5563;
|
| 102 |
+
padding-inline: 5rem;
|
| 103 |
+
margin-top:0;
|
| 104 |
+
margin-bottom:0;
|
| 105 |
+
font-size:1.05rem !important ;
|
| 106 |
+
@media ${media.tablet} {
|
| 107 |
+
font-size: 14px;
|
| 108 |
+
padding-inline: 2rem;
|
| 109 |
+
}
|
| 110 |
+
@media ${media.mobile} {
|
| 111 |
+
font-size: 12px;
|
| 112 |
+
padding-inline: 0.8rem;
|
| 113 |
+
}
|
| 114 |
+
`
|
| 115 |
+
|
| 116 |
+
const Wrapper = styled.div`
|
| 117 |
+
/* position: 'relative'; */
|
| 118 |
+
/* background: linear-gradient(to right, #6dd5fa, #2980b9); */
|
| 119 |
+
background-color: #ffffff;
|
| 120 |
+
/* background-color: #fa2020; */
|
| 121 |
+
color: black;
|
| 122 |
+
min-height: 100vh;
|
| 123 |
+
display: flex;
|
| 124 |
+
flex-direction: column;
|
| 125 |
+
justify-content: left;
|
| 126 |
+
align-items: left;
|
| 127 |
+
text-align: left;
|
| 128 |
+
font-family: Arial, sans-serif;
|
| 129 |
+
|
| 130 |
+
.container {
|
| 131 |
+
width: 90%;
|
| 132 |
+
margin: auto;
|
| 133 |
+
/* margin-top: 3rem; */
|
| 134 |
+
padding: 2rem;
|
| 135 |
+
background: transparent;
|
| 136 |
+
/* background: rgb(255, 255, 255); */
|
| 137 |
+
backdrop-filter: blur(12px);
|
| 138 |
+
/* box-shadow: 0 8px 32px rgba(0, 0, 0, 0.37); */
|
| 139 |
+
border-radius: 20px;
|
| 140 |
+
transition: transform 0.3s ease-in-out;
|
| 141 |
+
@media ${media.tablet} {
|
| 142 |
+
width: 95%;
|
| 143 |
+
padding: 1.2rem;
|
| 144 |
+
}
|
| 145 |
+
@media ${media.mobile} {
|
| 146 |
+
width: 98%;
|
| 147 |
+
padding: 0.8rem;
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
h1 {
|
| 151 |
+
font-size: 3rem;
|
| 152 |
+
color: #000000;
|
| 153 |
+
/* color: #3b82f6; */
|
| 154 |
+
text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
|
| 155 |
+
margin-bottom: 2rem;
|
| 156 |
+
}
|
| 157 |
+
h3{
|
| 158 |
+
color: #000000;
|
| 159 |
+
}
|
| 160 |
+
p {
|
| 161 |
+
/* font-size: 1.2rem; */
|
| 162 |
+
/* color: #000000; */
|
| 163 |
+
/* margin-bottom: 2rem; */
|
| 164 |
+
}
|
| 165 |
+
.graph-container {
|
| 166 |
+
display: none;
|
| 167 |
+
margin-top: 2rem;
|
| 168 |
+
text-align: center;
|
| 169 |
+
}
|
| 170 |
+
canvas {
|
| 171 |
+
margin: 20px auto;
|
| 172 |
+
max-width: 600px;
|
| 173 |
+
}
|
| 174 |
+
hr {
|
| 175 |
+
margin: 1.5px 0;
|
| 176 |
+
border: none;
|
| 177 |
+
border-top: 1.5px solid rgba(25, 75, 255, 0.7);
|
| 178 |
+
}
|
| 179 |
+
input {
|
| 180 |
+
padding: 10px;
|
| 181 |
+
/* margin-bottom: 20px; */
|
| 182 |
+
border: none;
|
| 183 |
+
border-radius: 10px;
|
| 184 |
+
/* width: 65%; */
|
| 185 |
+
text-align: center;
|
| 186 |
+
}
|
| 187 |
+
`;
|
| 188 |
+
|
| 189 |
+
export default App;
|
src/DataContext.jsx
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { createContext, useState } from "react";
|
| 2 |
+
|
| 3 |
+
export const DataContext = createContext();
|
| 4 |
+
|
| 5 |
+
export const DataProvider = ({ children }) => {
|
| 6 |
+
const [sharedData, setSharedData] = useState(null);
|
| 7 |
+
|
| 8 |
+
return (
|
| 9 |
+
<DataContext.Provider value={{ sharedData, setSharedData }}>
|
| 10 |
+
{children}
|
| 11 |
+
</DataContext.Provider>
|
| 12 |
+
);
|
| 13 |
+
};
|
src/Utils/helper.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// styles/media.js
|
| 2 |
+
export const sizes = {
|
| 3 |
+
mobile: '480px',
|
| 4 |
+
tablet: '768px',
|
| 5 |
+
laptop: '1200px',
|
| 6 |
+
};
|
| 7 |
+
|
| 8 |
+
export const media = {
|
| 9 |
+
mobile: `(max-width: ${sizes.mobile})`,
|
| 10 |
+
tablet: `(max-width: ${sizes.tablet})`,
|
| 11 |
+
laptop: `(max-width: ${sizes.laptop})`,
|
| 12 |
+
};
|
src/assets/ASR_HeadImg.svg
ADDED
|
|
src/assets/Age_group.png
ADDED
|
Git LFS Details
|
src/assets/Cluster.png
ADDED
|
Git LFS Details
|
src/assets/Dataset_table.png
ADDED
|
Git LFS Details
|
src/assets/Dataset_tableHQ.png
ADDED
|
Git LFS Details
|
src/assets/Ethnicity.png
ADDED
|
Git LFS Details
|
src/assets/FAW.png
ADDED
|
Git LFS Details
|
src/assets/Logo_new.png
ADDED
|
Git LFS Details
|
src/assets/Logo_noBG.png
ADDED
|
Git LFS Details
|
src/assets/SEG_group.png
ADDED
|
Git LFS Details
|
src/assets/illustration-your-users.svg
ADDED
|
|
src/assets/logo.png
ADDED
|
Git LFS Details
|
src/assets/main_LOGO.png
ADDED
|
Git LFS Details
|
src/assets/main_LOGO2.png
ADDED
|
Git LFS Details
|
src/assets/react.svg
ADDED
|
|
src/components/Contact.jsx
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react'
|
| 2 |
+
import styled from 'styled-components'
|
| 3 |
+
import CImg from '../assets/illustration-your-users.svg'
|
| 4 |
+
import ScoreCard from '../styled_components/Scorecard'
|
| 5 |
+
import { media } from '../Utils/helper'
|
| 6 |
+
|
| 7 |
+
function Contact() {
|
| 8 |
+
return (
|
| 9 |
+
<Container>
|
| 10 |
+
<h1>Contact Us</h1>
|
| 11 |
+
<Mdiv>
|
| 12 |
+
<Ldiv>
|
| 13 |
+
<ScoreCard direction="column" label="Prof. Animesh Mukherjee :" score="animeshm@cse.iitkgp.ac.in"></ScoreCard>
|
| 14 |
+
<ScoreCard direction="column" label="Anand Rai :" score="raianand.1991@gmail.com"></ScoreCard>
|
| 15 |
+
<ScoreCard direction="column" label="Utkarsh Anand :" score="ua28012006@gmail.com"></ScoreCard>
|
| 16 |
+
<ScoreCard direction="column" fontSize={1.3} label="Satyam R :" score="satyamrahangdale196@kgpian.iitkgp.ac.in"></ScoreCard>
|
| 17 |
+
</Ldiv>
|
| 18 |
+
<Rdiv>
|
| 19 |
+
<Image src={CImg}></Image>
|
| 20 |
+
</Rdiv>
|
| 21 |
+
</Mdiv>
|
| 22 |
+
</Container>
|
| 23 |
+
)
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
export default Contact
|
| 27 |
+
|
| 28 |
+
const Container = styled.div`
|
| 29 |
+
display: flex;
|
| 30 |
+
flex-direction: column;
|
| 31 |
+
padding: 2rem 1rem;
|
| 32 |
+
padding-top: 0;
|
| 33 |
+
margin-inline: auto;
|
| 34 |
+
/* align-items: center; */
|
| 35 |
+
/* justify-content: center; */
|
| 36 |
+
@media ${media.tablet} {
|
| 37 |
+
padding: 1.2rem;
|
| 38 |
+
}
|
| 39 |
+
@media ${media.mobile} {
|
| 40 |
+
padding: 0.8rem;
|
| 41 |
+
}
|
| 42 |
+
`
|
| 43 |
+
const Mdiv = styled.div`
|
| 44 |
+
display: flex;
|
| 45 |
+
gap: 3rem;
|
| 46 |
+
align-items: flex-start;
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
@media ${media.laptop} {
|
| 50 |
+
gap: 2rem;
|
| 51 |
+
flex-direction: column;
|
| 52 |
+
align-items: center;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
@media ${media.tablet} {
|
| 56 |
+
flex-direction: column;
|
| 57 |
+
gap: 2rem;
|
| 58 |
+
align-items: center;
|
| 59 |
+
}
|
| 60 |
+
`;
|
| 61 |
+
|
| 62 |
+
const Ldiv = styled.div`
|
| 63 |
+
display: flex;
|
| 64 |
+
flex-direction: column;
|
| 65 |
+
gap: 1rem;
|
| 66 |
+
flex: 1;
|
| 67 |
+
min-width: 280px;
|
| 68 |
+
max-width: 100%;
|
| 69 |
+
`;
|
| 70 |
+
|
| 71 |
+
const Rdiv = styled.div`
|
| 72 |
+
flex: 1;
|
| 73 |
+
display: flex;
|
| 74 |
+
justify-content: center;
|
| 75 |
+
align-items: center;
|
| 76 |
+
`;
|
| 77 |
+
|
| 78 |
+
const Image = styled.img`
|
| 79 |
+
width: 100%;
|
| 80 |
+
/* max-width: 500px; */
|
| 81 |
+
height: auto;
|
| 82 |
+
|
| 83 |
+
@media ${media.tablet} {
|
| 84 |
+
max-width: 100%;
|
| 85 |
+
}
|
| 86 |
+
`;
|
src/components/Dataset.jsx
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react'
|
| 2 |
+
import styled from 'styled-components'
|
| 3 |
+
import AgeGroup from '../assets/Age_group.png'
|
| 4 |
+
import SEGGroup from '../assets/SEG_group.png'
|
| 5 |
+
import EthGroup from '../assets/Ethnicity.png'
|
| 6 |
+
import FAWGroup from '../assets/FAW.png'
|
| 7 |
+
import Dateset from '../assets/Dataset_tableHQ.png'
|
| 8 |
+
import ClusterGroup from '../assets/Cluster.png'
|
| 9 |
+
import ScoreCard from '../styled_components/Scorecard'
|
| 10 |
+
import { Button } from 'primereact/button';
|
| 11 |
+
import { media } from '../Utils/helper'
|
| 12 |
+
|
| 13 |
+
function Dataset() {
|
| 14 |
+
return (
|
| 15 |
+
<Container>
|
| 16 |
+
<h1>Dataset Overview</h1>
|
| 17 |
+
|
| 18 |
+
<Section>
|
| 19 |
+
<Head>Introduction</Head>
|
| 20 |
+
<Para>
|
| 21 |
+
We use Meta's FairSpeech dataset to conduct fairness audits of speech recognition models submitted to our leaderboard. This dataset was specifically designed to address fairness gaps across diverse demographic groups. The complete FairSpeech dataset includes <b>26,471 utterances</b> recorded by <b>593 individuals</b> across the United States. Participants self-identified their personal information, including age, gender, ethnicity, geographic location, and whether they consider themselves native English speakers.
|
| 22 |
+
</Para>
|
| 23 |
+
<Para>
|
| 24 |
+
For our leaderboard evaluation, we use a stratified 10% sample from the FairSpeech dataset. We run inference using these test samples to evaluate the fairness of submitted models across different demographic groups. The original dataset spans seven domains: <b>music</b>, <b>capture</b>, <b>utilities</b>, <b>notification control</b>, <b>messaging</b>, <b>calling</b>, and <b>dictation</b>. In response to these domain-specific prompts, participants recorded audio commands such as searching for songs or making plans to meet friends.
|
| 25 |
+
</Para>
|
| 26 |
+
<Button label="Learn more about FairSpeech" icon="pi pi-file" link onClick={() => window.open('https://ai.meta.com/datasets/speech-fairness-dataset/', '_blank')} />
|
| 27 |
+
</Section>
|
| 28 |
+
|
| 29 |
+
<Gridbox>
|
| 30 |
+
<ScoreCard width="32rem" label="Dataset Source:" score="FairSpeech Dataset" />
|
| 31 |
+
<ScoreCard width="32rem" label="Dataset Released on: " score="JULY 13, 2023" />
|
| 32 |
+
<ScoreCard width="32rem" label="Total Audios in Original Dataset: " score={26471} />
|
| 33 |
+
<ScoreCard width="32rem" label="Evaluation Sample Size: " score="2647" />
|
| 34 |
+
<ScoreCard width="32rem" label="Average utterance length: " score="7.42 sec" />
|
| 35 |
+
<ScoreCard width="32rem" label="Primary Data Type: " score="Audio (.wav)" />
|
| 36 |
+
</Gridbox>
|
| 37 |
+
|
| 38 |
+
<Section>
|
| 39 |
+
<Head>Our Testing Strategy: Stratified Sampling</Head>
|
| 40 |
+
<Para mb={1}>
|
| 41 |
+
For our leaderboard evaluations, we employ stratified sampling to select a representative 10% subset from the FairSpeech dataset. Stratified sampling is critical in Automatic Speech Recognition (ASR) fairness testing to ensure that test sets reflect the overall dataset's distribution. This approach ensures demographic factors, background noise conditions, and linguistic diversity are properly represented, allowing us to evaluate model robustness and fairness across varied populations.
|
| 42 |
+
</Para>
|
| 43 |
+
<Image src={Dateset} />
|
| 44 |
+
</Section>
|
| 45 |
+
|
| 46 |
+
<Section>
|
| 47 |
+
<Head>Age Group by Gender Distribution</Head>
|
| 48 |
+
<Image src={AgeGroup} />
|
| 49 |
+
</Section>
|
| 50 |
+
|
| 51 |
+
<Section>
|
| 52 |
+
<Head>Socioeconomic Group by Gender Distribution</Head>
|
| 53 |
+
<Image src={SEGGroup} />
|
| 54 |
+
</Section>
|
| 55 |
+
|
| 56 |
+
<Section>
|
| 57 |
+
<Head>Ethnicity Distribution</Head>
|
| 58 |
+
<Image src={EthGroup} />
|
| 59 |
+
</Section>
|
| 60 |
+
|
| 61 |
+
<Section>
|
| 62 |
+
<Head>Frequently Used Words</Head>
|
| 63 |
+
<Image src={FAWGroup} />
|
| 64 |
+
</Section>
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
</Container>
|
| 68 |
+
)
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
export default Dataset;
|
| 72 |
+
|
| 73 |
+
const Container = styled.div`
|
| 74 |
+
display: flex;
|
| 75 |
+
flex-direction: column;
|
| 76 |
+
padding: 2rem 0rem;
|
| 77 |
+
padding-top: 0;
|
| 78 |
+
margin-inline: auto;
|
| 79 |
+
max-width: 1200px; /* To control the width */
|
| 80 |
+
`;
|
| 81 |
+
|
| 82 |
+
const Gridbox = styled.div`
|
| 83 |
+
display: grid;
|
| 84 |
+
margin: auto;
|
| 85 |
+
grid-template-columns: 1fr 1fr;
|
| 86 |
+
grid-gap: 2rem 4rem;
|
| 87 |
+
padding: 2rem 0;
|
| 88 |
+
@media ${media.tablet} {
|
| 89 |
+
grid-gap: 3rem;
|
| 90 |
+
}
|
| 91 |
+
@media ${media.mobile} {
|
| 92 |
+
display: flex;
|
| 93 |
+
flex-direction: column;
|
| 94 |
+
gap: 1.2rem;
|
| 95 |
+
}
|
| 96 |
+
`;
|
| 97 |
+
|
| 98 |
+
const Section = styled.section`
|
| 99 |
+
margin-bottom: 3rem;
|
| 100 |
+
`;
|
| 101 |
+
|
| 102 |
+
const Head = styled.h6`
|
| 103 |
+
font-size: 2rem;
|
| 104 |
+
color: #3b82f6;
|
| 105 |
+
margin-bottom: 1rem;
|
| 106 |
+
text-decoration: underline;
|
| 107 |
+
`;
|
| 108 |
+
|
| 109 |
+
const Image = styled.img`
|
| 110 |
+
max-width: 80%;
|
| 111 |
+
display: block;
|
| 112 |
+
margin: 1rem auto;
|
| 113 |
+
@media ${media.tablet} {
|
| 114 |
+
max-width: 90%;
|
| 115 |
+
}
|
| 116 |
+
@media ${media.mobile} {
|
| 117 |
+
max-width: 100%;
|
| 118 |
+
}
|
| 119 |
+
`;
|
| 120 |
+
|
| 121 |
+
const Para = styled.p`
|
| 122 |
+
color: #4b5563;
|
| 123 |
+
font-size: 1.4rem;
|
| 124 |
+
line-height: 1.8;
|
| 125 |
+
margin-bottom: ${props => props.mb || 2}rem;
|
| 126 |
+
text-align: justify;
|
| 127 |
+
`;
|
src/components/Home.jsx
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react'
|
| 2 |
+
import { useState } from 'react'
|
| 3 |
+
import reactLogo from '../assets/react.svg'
|
| 4 |
+
import viteLogo from '/vite.svg'
|
| 5 |
+
import axios from 'axios'
|
| 6 |
+
import Button from '../styled_components/Button'
|
| 7 |
+
import { Link } from 'react-router-dom'
|
| 8 |
+
import { Navigate, useNavigate } from 'react-router-dom'
|
| 9 |
+
import ScoreCard from '../styled_components/Scorecard'
|
| 10 |
+
import { Leaderboard } from './Leaderboard'
|
| 11 |
+
import styled from 'styled-components'
|
| 12 |
+
import { useContext } from 'react'
|
| 13 |
+
import { Head } from './Request'
|
| 14 |
+
|
| 15 |
+
function Home({baseUrl}) {
|
| 16 |
+
let [result, setResult] = useState(false);
|
| 17 |
+
const navigate = useNavigate();
|
| 18 |
+
|
| 19 |
+
const getData = async () => {
|
| 20 |
+
const res = await axios.get('http://localhost:3000');
|
| 21 |
+
console.log(res.data);
|
| 22 |
+
setResult(res.data);
|
| 23 |
+
}
|
| 24 |
+
const handleClick = ()=>{
|
| 25 |
+
console.log("hi navigatering");
|
| 26 |
+
navigate('/leaderboard');
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
return (
|
| 30 |
+
<>
|
| 31 |
+
<h1>ASR fairness benchmark</h1>
|
| 32 |
+
{/* <button onClick={getData}> GET DATA </button> */}
|
| 33 |
+
{/* { result && <p> {result.message} at {result.endpoint} route </p> }
|
| 34 |
+
<p className="read-the-docs">
|
| 35 |
+
This platform allows users to request automatic speech recognition machine learning models, view performance metrics, and track model leaderboards.
|
| 36 |
+
</p>
|
| 37 |
+
<br></br> */}
|
| 38 |
+
{/* <Button type="submit" shadow="blue" bg="#3b82f6" color="white" onClick={handleClick}>Explore</Button> */}
|
| 39 |
+
{/* <newHead>sdsdsWelcome to ASR-Fairbench</newHead> */}
|
| 40 |
+
<Leaderboard baseUrl={baseUrl} />
|
| 41 |
+
</>
|
| 42 |
+
)
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
export {Home}
|
| 46 |
+
|
| 47 |
+
const newHead = styled(Head)`
|
| 48 |
+
background: #3b82f6;
|
| 49 |
+
color: #a9a9a9;
|
| 50 |
+
padding: 1rem;
|
| 51 |
+
font-size: 2rem;
|
| 52 |
+
text-align: center;
|
| 53 |
+
`;
|
src/components/Leaderboard.jsx
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
+
import { DataTable } from 'primereact/datatable';
|
| 3 |
+
import { Column } from 'primereact/column';
|
| 4 |
+
import Table from '../styled_components/Table';
|
| 5 |
+
import { Button } from 'primereact/button';
|
| 6 |
+
import { Tooltip } from 'primereact/tooltip';
|
| 7 |
+
import jsPDF from 'jspdf';
|
| 8 |
+
import autoTable from 'jspdf-autotable';
|
| 9 |
+
import axios from "axios";
|
| 10 |
+
import { useContext } from "react";
|
| 11 |
+
import { DataContext } from "../DataContext";
|
| 12 |
+
import { ProgressSpinner } from 'primereact/progressspinner';
|
| 13 |
+
import styled from 'styled-components';
|
| 14 |
+
|
| 15 |
+
export function Leaderboard({ baseUrl }) {
|
| 16 |
+
|
| 17 |
+
const [products, setProducts] = useState(null);
|
| 18 |
+
const dt = useRef(null);
|
| 19 |
+
const { sharedData, setSharedData } = useContext(DataContext);
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
let data = [
|
| 23 |
+
{ Model: "OpenAi/whisper", WER: 0.15, FS: 0.87, FS_G: 8.41, FS_L: 0.85, FS_SEG: 0.8, FS_E: 0.8 },
|
| 24 |
+
{ Model: "OpenAi/whisper-mini", WER: 0.25, FS: 0.8, FS_G: 0.85, FS_L: 0.75, FS_SEG: 0.65, FS_E: 0.8 }
|
| 25 |
+
]
|
| 26 |
+
|
| 27 |
+
useEffect(() => {
|
| 28 |
+
if (!(sharedData && sharedData.Leaderboard)) {
|
| 29 |
+
const fetchData = async () => {
|
| 30 |
+
const headers = {
|
| 31 |
+
'ngrok-skip-browser-warning': "10008"
|
| 32 |
+
};
|
| 33 |
+
const res = await axios.get(`${baseUrl}/fetch`, { headers });
|
| 34 |
+
let Data = res.data.data; // Await the promise
|
| 35 |
+
const uniqueData = Data.filter((value, index, self) =>
|
| 36 |
+
index === self.findIndex((t) => t.Model === value.Model)
|
| 37 |
+
);
|
| 38 |
+
setProducts(uniqueData); // Set the resolved data to state
|
| 39 |
+
setSharedData({ ...sharedData, Leaderboard: uniqueData })
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
fetchData();
|
| 43 |
+
} else {
|
| 44 |
+
setProducts(sharedData.Leaderboard);
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
}, [sharedData, setSharedData, baseUrl]);
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
const exportCSV = (selectionOnly) => {
|
| 52 |
+
dt.current.exportCSV({ selectionOnly });
|
| 53 |
+
};
|
| 54 |
+
|
| 55 |
+
const exportPdf = () => {
|
| 56 |
+
// const doc = new jsPDF();
|
| 57 |
+
const doc = new jsPDF({ orientation: 'landscape' });
|
| 58 |
+
|
| 59 |
+
// Add heading
|
| 60 |
+
// Set font size and get page width
|
| 61 |
+
doc.setFontSize(16);
|
| 62 |
+
const pageWidth = doc.internal.pageSize.width; // Get page width
|
| 63 |
+
const text = 'Leaderboard Report';
|
| 64 |
+
const textWidth = doc.getTextWidth(text); // Get text width
|
| 65 |
+
const xPosition = (pageWidth - textWidth) / 2; // Center position
|
| 66 |
+
|
| 67 |
+
// Add centered heading
|
| 68 |
+
doc.text(text, xPosition, 15);
|
| 69 |
+
|
| 70 |
+
// Define table headers
|
| 71 |
+
const columns = [
|
| 72 |
+
{ header: 'Model Name', dataKey: 'Model' },
|
| 73 |
+
{ header: 'Fairness Adjusted ASR Score', dataKey: 'FAAS' },
|
| 74 |
+
{ header: 'Average WER', dataKey: 'WER' },
|
| 75 |
+
{ header: 'Average RTFX', dataKey: 'RTFX' },
|
| 76 |
+
{ header: 'Overall Fairness Score', dataKey: 'FS' },
|
| 77 |
+
{ header: 'Fairness Score (Gender)', dataKey: 'FS_G' },
|
| 78 |
+
{ header: 'Fairness Score (First Language)', dataKey: 'FS_L' },
|
| 79 |
+
{ header: 'Fairness Score (Socioeconomic Background)', dataKey: 'FS_SEG' },
|
| 80 |
+
{ header: 'Fairness Score (Ethnicity)', dataKey: 'FS_E' }
|
| 81 |
+
];
|
| 82 |
+
|
| 83 |
+
// Convert data into row format
|
| 84 |
+
const rows = products.map(row => columns.map(col => row[col.dataKey]));
|
| 85 |
+
|
| 86 |
+
// Call autoTable properly
|
| 87 |
+
autoTable(doc, {
|
| 88 |
+
theme: 'grid',
|
| 89 |
+
head: [columns.map(col => col.header)], // Table headers
|
| 90 |
+
body: rows, // Table data
|
| 91 |
+
startY: 20, // Set Y position after the heading
|
| 92 |
+
styles: { lineWidth: 0.15 }, // Ensure grid lines are visible
|
| 93 |
+
headStyles: { textColor: 255, lineWidth: 0.15 } // Ensure header has grid lines
|
| 94 |
+
});
|
| 95 |
+
|
| 96 |
+
doc.save('Leaderboard.pdf');
|
| 97 |
+
};
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
const header = (
|
| 101 |
+
<div className="flex align-items-center justify-content-end gap-2">
|
| 102 |
+
<Tooltip target=".tooltip-btn" />
|
| 103 |
+
<Button type="button" icon="pi pi-file" rounded onClick={() => exportCSV(false)} className="tooltip-btn" data-pr-tooltip="Export CSV" />
|
| 104 |
+
{/* <Button type="button" icon="pi pi-file-excel" severity="success" rounded onClick={exportExcel} data-pr-tooltip="XLS" /> */}
|
| 105 |
+
<Button type="button" icon="pi pi-file-pdf" severity="warning" rounded onClick={exportPdf} className="tooltip-btn" data-pr-tooltip="Export PDF" />
|
| 106 |
+
</div>
|
| 107 |
+
);
|
| 108 |
+
//! For making the model name hyperlinks
|
| 109 |
+
const [selectedCell, setSelectedCell] = useState(null);
|
| 110 |
+
const onCellClick = (event) => {
|
| 111 |
+
if(event.field!="Model") return ;
|
| 112 |
+
const url = `https://huggingface.co/${event.value}`; // Replace with your URL
|
| 113 |
+
window.open(url, "_blank", "noopener,noreferrer");
|
| 114 |
+
};
|
| 115 |
+
|
| 116 |
+
return (<>
|
| 117 |
+
{/* <h1>Leaderboard</h1> */}
|
| 118 |
+
{/* <h3>Track Top performing models</h3> */}
|
| 119 |
+
<H3>Leaderboard of the ASR models audited on this platform :</H3>
|
| 120 |
+
{products ? (<div className="card border-round-3xl overflow-hidden shadow-2">
|
| 121 |
+
<Tooltip target=".export-buttons>button" position="bottom" />
|
| 122 |
+
<DataTable ref={dt} header={header} value={products} removableSort showGridlines
|
| 123 |
+
sortField="FAAS"
|
| 124 |
+
sortOrder={-1}
|
| 125 |
+
tableStyle={{ minWidth: '20rem' }}
|
| 126 |
+
cellSelection selectionMode="single" selection={selectedCell}
|
| 127 |
+
onSelectionChange={(e) => setSelectedCell(e.value)} metaKeySelection={false}
|
| 128 |
+
onCellClick={onCellClick}
|
| 129 |
+
>
|
| 130 |
+
<Column field="Model" header="Model Name" sortable filter></Column>
|
| 131 |
+
<Column field="FAAS" header="Fairness Adjusted ASR Score" sortable></Column>
|
| 132 |
+
<Column field="WER" header="Average WER" sortable></Column>
|
| 133 |
+
<Column field="RTFX" header="Average RTFX" sortable></Column>
|
| 134 |
+
<Column field="FS" header="Overall Fairness Score" sortable></Column>
|
| 135 |
+
<Column field="FS_G" header="Fairness Score (Gender)" sortable></Column>
|
| 136 |
+
<Column field="FS_L" header="Fairness Score (First Language)" sortable></Column>
|
| 137 |
+
<Column field="FS_SEG" header="Fairness Score (Socioeconomic Background)" sortable></Column>
|
| 138 |
+
<Column field="FS_E" header="Fairness Score (Ethnicity)" sortable></Column>
|
| 139 |
+
</DataTable>
|
| 140 |
+
</div>)
|
| 141 |
+
:
|
| 142 |
+
(<ProgressSpinner style={{ width: '200px', height: '200px' }} strokeWidth="3" />)}
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
<br></br>
|
| 146 |
+
</>)
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
const H3 = styled.h3`
|
| 150 |
+
color: #515458 !important
|
| 151 |
+
`
|
| 152 |
+
|