Predict employee attrition using ML + Streamlit"
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.
HR_Employee_Attrition.csv
โ Sample HR datasetapp.py
โ Streamlit web applicationattrition_app.ipynb
โ Google Colab notebook for training the ML model
Once hosted, you can use ngrok to expose the Streamlit app and get a public URL.
- Upload all files (
.ipynb
,.csv
,.py
) to your Colab environment - Open
attrition_app.ipynb
and run all cells - Use
ngrok
public link to view the app
# 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