Update README.md
Browse files
README.md
CHANGED
@@ -8,18 +8,11 @@ sdk_version: 5.23.1
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
11 |
-
Sure! Here’s the final, polished README.md text you can use for your Bias Bin project:
|
12 |
-
|
13 |
-
⸻
|
14 |
|
15 |
Bias Bin: Bias Detection and Mitigation in Language Models
|
16 |
|
17 |
Bias Bin is an interactive Gradio-based web application for detecting and mitigating gender bias in narrative text. It uses a fine-tuned BERT model and counterfactual data augmentation techniques to highlight and analyze bias in NLP outputs.
|
18 |
|
19 |
-
🚀 Live Demo: Try it on Hugging Face Spaces
|
20 |
-
|
21 |
-
⸻
|
22 |
-
|
23 |
🧠 Project Overview
|
24 |
|
25 |
This tool allows users to:
|
@@ -28,9 +21,7 @@ This tool allows users to:
|
|
28 |
• Visualize bias scores to understand model behavior.
|
29 |
• Demonstrate bias mitigation through gender-swapped text examples.
|
30 |
|
31 |
-
This project was developed as part of a university coursework in Deep Learning & Generative AI
|
32 |
-
|
33 |
-
⸻
|
34 |
|
35 |
📁 Repository Contents
|
36 |
• app.py – Main Python file to launch the Gradio web app.
|
@@ -38,39 +29,30 @@ This project was developed as part of a university coursework in Deep Learning &
|
|
38 |
• fine_tuned_model.zip – Zip file containing the fine-tuned BERT model (must be extracted).
|
39 |
• requirements.txt – List of Python dependencies.
|
40 |
|
41 |
-
⸻
|
42 |
-
|
43 |
⚙️ Setup Instructions
|
44 |
1. Clone the Repository
|
45 |
|
46 |
git clone https://huggingface.co/spaces/aryn25/bias.bin
|
47 |
cd bias.bin
|
48 |
|
49 |
-
|
50 |
2. Install Dependencies
|
51 |
|
52 |
pip install -r requirements.txt
|
53 |
|
54 |
-
|
55 |
3. Extract the Model
|
56 |
Unzip the fine_tuned_model.zip file and place the extracted folder in the project root.
|
57 |
4. Run the App
|
58 |
|
59 |
python app.py
|
60 |
|
61 |
-
|
62 |
5. Open in Browser
|
63 |
-
Visit the Gradio URL printed in the terminal
|
64 |
-
|
65 |
-
⸻
|
66 |
|
67 |
📊 Methodology
|
68 |
• Model: Fine-tuned BERT classifier trained on gender-labeled narrative datasets.
|
69 |
• Bias Detection: Uses counterfactual data augmentation by swapping gendered words (e.g., “he” → “she”).
|
70 |
• Metrics: Bias scores are computed based on prediction discrepancies between original and counterfactual samples.
|
71 |
|
72 |
-
⸻
|
73 |
-
|
74 |
📚 References
|
75 |
|
76 |
This project is built using foundational and peer-reviewed research on:
|
@@ -81,19 +63,10 @@ This project is built using foundational and peer-reviewed research on:
|
|
81 |
|
82 |
Full citation list available in the project report.
|
83 |
|
84 |
-
⸻
|
85 |
-
|
86 |
📌 Authors
|
87 |
|
88 |
Created by Aryan N. Salge and team as part of the Deep Learning & Generative AI coursework at the National College of Ireland.
|
89 |
|
90 |
-
⸻
|
91 |
-
|
92 |
📄 License
|
93 |
|
94 |
This project is for educational and research purposes. Please cite appropriately if you use or adapt the work.
|
95 |
-
|
96 |
-
⸻
|
97 |
-
|
98 |
-
Let me know if you’d like a version tailored for GitHub, Hugging Face README.md, or both!
|
99 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
---
|
|
|
|
|
|
|
11 |
|
12 |
Bias Bin: Bias Detection and Mitigation in Language Models
|
13 |
|
14 |
Bias Bin is an interactive Gradio-based web application for detecting and mitigating gender bias in narrative text. It uses a fine-tuned BERT model and counterfactual data augmentation techniques to highlight and analyze bias in NLP outputs.
|
15 |
|
|
|
|
|
|
|
|
|
16 |
🧠 Project Overview
|
17 |
|
18 |
This tool allows users to:
|
|
|
21 |
• Visualize bias scores to understand model behavior.
|
22 |
• Demonstrate bias mitigation through gender-swapped text examples.
|
23 |
|
24 |
+
This project was developed as part of a university coursework in Deep Learning & Generative AI.
|
|
|
|
|
25 |
|
26 |
📁 Repository Contents
|
27 |
• app.py – Main Python file to launch the Gradio web app.
|
|
|
29 |
• fine_tuned_model.zip – Zip file containing the fine-tuned BERT model (must be extracted).
|
30 |
• requirements.txt – List of Python dependencies.
|
31 |
|
|
|
|
|
32 |
⚙️ Setup Instructions
|
33 |
1. Clone the Repository
|
34 |
|
35 |
git clone https://huggingface.co/spaces/aryn25/bias.bin
|
36 |
cd bias.bin
|
37 |
|
|
|
38 |
2. Install Dependencies
|
39 |
|
40 |
pip install -r requirements.txt
|
41 |
|
|
|
42 |
3. Extract the Model
|
43 |
Unzip the fine_tuned_model.zip file and place the extracted folder in the project root.
|
44 |
4. Run the App
|
45 |
|
46 |
python app.py
|
47 |
|
|
|
48 |
5. Open in Browser
|
49 |
+
Visit the Gradio URL printed in the terminal
|
|
|
|
|
50 |
|
51 |
📊 Methodology
|
52 |
• Model: Fine-tuned BERT classifier trained on gender-labeled narrative datasets.
|
53 |
• Bias Detection: Uses counterfactual data augmentation by swapping gendered words (e.g., “he” → “she”).
|
54 |
• Metrics: Bias scores are computed based on prediction discrepancies between original and counterfactual samples.
|
55 |
|
|
|
|
|
56 |
📚 References
|
57 |
|
58 |
This project is built using foundational and peer-reviewed research on:
|
|
|
63 |
|
64 |
Full citation list available in the project report.
|
65 |
|
|
|
|
|
66 |
📌 Authors
|
67 |
|
68 |
Created by Aryan N. Salge and team as part of the Deep Learning & Generative AI coursework at the National College of Ireland.
|
69 |
|
|
|
|
|
70 |
📄 License
|
71 |
|
72 |
This project is for educational and research purposes. Please cite appropriately if you use or adapt the work.
|
|
|
|
|
|
|
|
|
|