Skip to content

Classify person's gender based on his/her first name.

Notifications You must be signed in to change notification settings

AparGarg99/Gender-Classifier

Repository files navigation

OVERVIEW 📚

  • This project uses a Bidirectional LSTM model and numerous machine learning models such as Naive Bayes, Random Forest, and KNN to classify a person's gender (M/F) based on his/her first name.
  • The dataset used consists of 95,025 first names and their corresponding gender.
  • Bidirectional LSTM performed best (95% accuracy on train data, 91% accuracy on validation data, 91% accuracy on test data).
  • Key Tools & Technologies Used - TensorFlow, Keras, scikit-learn, Flask, HTML, CSS.

DEMO 🎥


INSTALLATION AND USAGE 🔌

  1. Open Anaconda command prompt
  2. Create new anaconda environment
conda create -n "gc_project" python==3.7
  1. Activate anaconda environment
conda activate "gc_project"
  1. Open the project
git clone https://github.com/AparGarg99/Gender-Classifier.git
cd Gender-Classifier
  1. Install the required dependencies
pip install -r requirements.txt
  1. Create models directory
mkdir models
  1. Launch Jupyter Notebook
jupyter notebook
  1. Execute 1_BiLSTM_Modeling.ipynb notebook to train and save model in models directory

  2. Run flask web app using anaconda prompt

python app.py
  1. Open a browser and type in the URL displayed in anaconda prompt. e.g. http://127.0.0.1:5000/



Don't forget to give a ⭐ if you like this project !!