What inspired us
The world is rapidly evolving, but gender bias in policymaking still lingers—often unspoken, often unnoticed. While policies may appear neutral on paper, they can marginalize women and minority groups in practice. This disconnect inspired us to build Code Purple, a tool that aligns with the Sustainable Development Goals (SDG 5: Gender Equality and SDG 10: Reduced Inequalities). Our goal was to detect and address hidden bias in policies, enabling more equitable, inclusive governance that translates well beyond paper.
What it does?
Code Purple scans policy documents to identify potentially biased or exclusionary language. Using a fine-tuned BERT model, the platform helps policymakers and advocates uncover hidden gender bias, offering a practical step toward creating more inclusive laws and frameworks.
How we built it
We began with brainstorming and research to understand how policy language embeds bias. We then curated a custom dataset, fine-tuned a BERT model from Hugging Face, and used Streamlit to build an interactive frontend. The result is a lightweight yet powerful tool that empowers users to analyze policy text in real time.
Challenges we ran into
- Finding reliable documents: Accessing official and diverse policy texts was harder than expected.
- Curating a balanced dataset: We had to be extremely mindful of how bias could creep into our own data.
- Model sensitivity: Striking the right balance between catching bias and avoiding overflagging was a technical challenge.
- Time constraints: With limited time, we had to prioritize core features over extras while staying true to our vision.
Accomplishments that we're proud of
- Building an end-to-end bias detection system from scratch.
- Creating a dataset and model that speaks to real-world challenges in governance.
- Aligning our solution with global SDG goals and opening a path for further innovation in ethical policymaking.
What we learned
Bias isn’t always loud—it can be systemic, subtle, and deeply embedded in how laws are written. We learned that inclusion must be intentional and measurable. We also understood the importance of continuous reflection—both technical and ethical—when building tools that interact with sensitive societal issues.
What's next for Code Purple
- Expanding the dataset to improve the model’s performance across different policy contexts and cultural regions.
- Advanced training and fine-tuning for greater accuracy and fewer false positives.
- Integration into real-world systems, including government drafting platforms and policy review pipelines, so inclusive policy becomes a built-in standard—not an afterthought.
Built With
- bert
- natural-language-processing
- python
- streamlit
- transformers



Log in or sign up for Devpost to join the conversation.