satyamr196 commited on
Commit
ce8c232
·
1 Parent(s): ccead65

Migrated the frontend from Static HTML to Static React

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. README.md +170 -5
  2. assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  3. assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  4. assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  5. assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  6. assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  7. assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  8. assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  9. assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  10. assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -3
  11. assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  12. assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -3
  13. assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  14. assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -3
  15. assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  16. assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  17. assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -3
  18. assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  19. assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  20. assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  21. assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  22. assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -3
  23. assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -3
  24. assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  25. assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  26. assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  27. assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -3
  28. assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  29. assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  30. assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  31. assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -3
  32. assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  33. assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -3
  34. assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  35. assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -3
  36. assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  37. assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  38. assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  39. assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  40. assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -3
  41. assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  42. assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -3
  43. assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  44. assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  45. assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  46. assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -3
  47. assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  48. assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -3
  49. assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  50. assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
README.md CHANGED
@@ -1,11 +1,176 @@
1
  ---
2
  title: ASR FairBench
3
- emoji: 🌍
4
- colorFrom: yellow
5
- colorTo: gray
6
  sdk: static
7
  pinned: false
8
- short_description: It is an ASR LLMs benchmarking tool focused on Fairness.
 
 
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  title: ASR FairBench
3
+ emoji: 🏆
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: static
7
  pinned: false
8
+ short_description: Open-source ASR audit platform focused on fairness
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
+ ![](/public/Req_home.png)
17
+ ![](/public/Req_result.png)
18
+ ![](/public/Req_result2.png)
19
+ ![](/public/Req_result3.png)
20
+ ![](/public/LBoard.png)
21
+ ![](/public/Dataset.png)
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
+ ![](/public/CF_home.png)
109
+ <!-- <img src="/public/CF_Leaderboard.png" alt="Project Logo" width="100%"> -->
110
+ ![](/public/CF_Leaderboard.png)
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
+ ![](/public/Access_token.png)
120
+
121
+ - Then you can selet either clone the repository or duplicate the space option to create your own space.
122
+
123
+ ![](/public/clone_repo.png)
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
+ ![](/public/Url_app.png)
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
+ ![](/public/Backend4.png)
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
+ ![](/public/ngrok_token.png)
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
+ ![](/public/Url_app.png)
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)
assets/KaTeX_AMS-Regular-DMm9YOAa.woff DELETED
Binary file (33.5 kB)
 
assets/KaTeX_AMS-Regular-DRggAlZN.ttf DELETED
Binary file (63.6 kB)
 
assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf DELETED
Binary file (12.4 kB)
 
assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff DELETED
Binary file (7.72 kB)
 
assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff DELETED
Binary file (7.66 kB)
 
assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf DELETED
Binary file (12.3 kB)
 
assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf DELETED
Binary file (19.6 kB)
 
assets/KaTeX_Fraktur-Bold-BsDP51OF.woff DELETED
Binary file (13.3 kB)
 
assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:74444efd593c005e3f4573b44524704c0af0a937fe911cca9e94068d0d140d3f
3
- size 11348
 
 
 
 
assets/KaTeX_Fraktur-Regular-CB_wures.ttf DELETED
Binary file (19.6 kB)
 
assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:51814d270d06ff0255dba0799994fa4d8c84d11f09951d47595f4abb1f3602dc
3
- size 11316
 
 
 
 
assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff DELETED
Binary file (13.2 kB)
 
assets/KaTeX_Main-Bold-Cx986IdX.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:0f60d1b897938ec918c8ce073092411baf9438f6739465693ff18b0f9d20b021
3
- size 25324
 
 
 
 
assets/KaTeX_Main-Bold-Jm3AIy58.woff DELETED
Binary file (29.9 kB)
 
assets/KaTeX_Main-Bold-waoOVXN0.ttf DELETED
Binary file (51.3 kB)
 
assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:99cd42a3c072d918f2f44984a807cf7aa16e13545fd0875fc07c6c65f99e715b
3
- size 16780
 
 
 
 
assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf DELETED
Binary file (33 kB)
 
assets/KaTeX_Main-BoldItalic-SpSLRI95.woff DELETED
Binary file (19.4 kB)
 
assets/KaTeX_Main-Italic-3WenGoN9.ttf DELETED
Binary file (33.6 kB)
 
assets/KaTeX_Main-Italic-BMLOBm91.woff DELETED
Binary file (19.7 kB)
 
assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:97479ca6cce906abc961ecac96faa5f9ca2e61b8e7670d475826bcdee9a7c267
3
- size 16988
 
 
 
 
assets/KaTeX_Main-Regular-B22Nviop.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:c2342cd8b869e01752a9321dc17213fc40d4d04c79688c1d43f2cf316abd7866
3
- size 26272
 
 
 
 
assets/KaTeX_Main-Regular-Dr94JaBh.woff DELETED
Binary file (30.8 kB)
 
assets/KaTeX_Main-Regular-ypZvNtVU.ttf DELETED
Binary file (53.6 kB)
 
assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf DELETED
Binary file (31.2 kB)
 
assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:dc47344dbb6cb5b655c8460d561f4df5f501b90c804ad3c6cec65fe322351ab1
3
- size 16400
 
 
 
 
assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff DELETED
Binary file (18.7 kB)
 
assets/KaTeX_Math-Italic-DA0__PXp.woff DELETED
Binary file (18.7 kB)
 
assets/KaTeX_Math-Italic-flOr_0UB.ttf DELETED
Binary file (31.3 kB)
 
assets/KaTeX_Math-Italic-t53AETM-.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:7af58c5ec8f132a2ddde9027c6d7814decce4d3b822a11192a42a20e2e973264
3
- size 16440
 
 
 
 
assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf DELETED
Binary file (24.5 kB)
 
assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e99ae51144bf1232efcc1bfe5add36262c6866b0faab24fa75740e1b98577a62
3
- size 12216
 
 
 
 
assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff DELETED
Binary file (14.4 kB)
 
assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:00b26ac825e2095056396e0553b8ac26d3f8ad158c3826e28b4c45b385c4714a
3
- size 12028
 
 
 
 
assets/KaTeX_SansSerif-Italic-DN2j7dab.woff DELETED
Binary file (14.1 kB)
 
assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf DELETED
Binary file (22.4 kB)
 
assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf DELETED
Binary file (19.4 kB)
 
assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff DELETED
Binary file (12.3 kB)
 
assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:68e8c73ef42afd3ccec58bf0fba302cce448938e7fc020a5e31f8a952eee1342
3
- size 10344
 
 
 
 
assets/KaTeX_Script-Regular-C5JkGWo-.ttf DELETED
Binary file (16.6 kB)
 
assets/KaTeX_Script-Regular-D3wIWfF6.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:036d4e95149b69ff9bcc0cd55771efeb25ffa3947293e69acd78d5ac328c684b
3
- size 9644
 
 
 
 
assets/KaTeX_Script-Regular-D5yQViql.woff DELETED
Binary file (10.6 kB)
 
assets/KaTeX_Size1-Regular-C195tn64.woff DELETED
Binary file (6.5 kB)
 
assets/KaTeX_Size1-Regular-Dbsnue_I.ttf DELETED
Binary file (12.2 kB)
 
assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:6b47c40166b6dbe21a5dfca7718413f2147fd2399be1ba605d8ad39cedf25dfe
3
- size 5468
 
 
 
 
assets/KaTeX_Size2-Regular-B7gKUWhC.ttf DELETED
Binary file (11.5 kB)
 
assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d04c54219f9eaec6d4d4fd42dfb28785975a4794d6b2fc71e566b9cd6db842dd
3
- size 5208
 
 
 
 
assets/KaTeX_Size2-Regular-oD1tc_U0.woff DELETED
Binary file (6.19 kB)
 
assets/KaTeX_Size3-Regular-CTq5MqoE.woff DELETED
Binary file (4.42 kB)