Diversity IQ is an AI-powered tool that helps detect bias in your dataset before model training. It analyzes categorical features like gender or ethnicity, flags imbalance, and offers suggestions to improve fairness — helping you build ethical AI from the ground up.
Follow the steps below to run the project locally.
git clone https://github.com/your-username/diversity-iq.git
cd diversity-iqMake sure Python 3.8+ is installed.
pip install -r requirements.txtIn the root directory, create a .env file and add your OpenAI API key:
OPEN_AI_API=your_openai_api_key_hereuvicorn main:app --reloadThe backend will start at:
📍 http://127.0.0.1:8000
cd frontendnpm installnpm startThe frontend will start at:
🌐 http://localhost:3000
- 📊 Category-wise Distribution Stats
- ⚖️ Fairness Verdict
- 💡 Actionable Suggestions to improve dataset balance
- 🧠 Uses OpenAI for smart analysis
- 📈 Ready for frontend visualization
Upload a CSV file with columns like gender, ethnicity, etc. The tool returns:
{
"gender": {
"male": 60,
"female": 40
},
"genderComment": "One category has over 50% representation. Consider balancing.",
"verdict": "Unfair Distribution"
}- Frontend: React.js
- Backend: FastAPI
- AI Integration: OpenAI API
- Languages: Python, JavaScript