Skip to content

sulaiman01626/hr-attrition-predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

hr-attrition-predictor

Predict employee attrition using ML + Streamlit"

๐Ÿง‘โ€๐Ÿ’ผ HR Employee Attrition Predictor

This project uses a machine learning model to predict whether an employee will leave the company (attrition) based on HR data such as age, salary, education, and job level.


๐Ÿ“ Files Included

  • HR_Employee_Attrition.csv โ€“ Sample HR dataset
  • app.py โ€“ Streamlit web application
  • attrition_app.ipynb โ€“ Google Colab notebook for training the ML model

๐Ÿš€ Live Demo (if using ngrok)

Once hosted, you can use ngrok to expose the Streamlit app and get a public URL.


โš™๏ธ How to Run the Project

โ–ถ๏ธ Option 1: Run in Google Colab

  1. Upload all files (.ipynb, .csv, .py) to your Colab environment
  2. Open attrition_app.ipynb and run all cells
  3. Use ngrok public link to view the app

โ–ถ๏ธ Option 2: Run Locally

# Clone the repository
git clone https://github.com/your-username/hr-attrition-predictor.git
cd hr-attrition-predictor

# Install dependencies
pip install streamlit scikit-learn pandas joblib

# Run the app
streamlit run app.py

๐Ÿ“Š Features
Predict employee attrition (will leave / will stay)

Streamlit interface for easy input

Trained with RandomForestClassifier

Dataset encoded with LabelEncoder

Real-time prediction on user input

About

Predict employee attrition using ML + Streamlit"

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published