Skip to content

iAmSoundarya/Employee-Salary-Prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

💼 Employee Salary Prediction Web App

This project is a machine learning-powered web application built using Streamlit that predicts the salary of an employee based on their experience and skillset. The app is designed for ease of use and can be accessed both locally and publicly using ngrok.

📌 Table of Contents

📊 Features

  • ✅ Predict employee salary based on experience and other features
  • 🧠 ML model trained on real-world data using regression
  • 🧾 Interactive and user-friendly UI using Streamlit
  • 📈 Live display of predicted results
  • 🌐 Accessible from anywhere using ngrok tunneling
  • 🛠️ Easy to deploy and extend for more features (e.g. role, skills)

🧠 Tech Stack

Component Technology
UI Streamlit
Backend Python
Machine Learning Scikit-learn
Model Storage Joblib (.pkl model)
Deployment ngrok (local → public)

📁 Project Structure:

employee-salary-predictor/

├── app.py
├── model/

│ └── salary_model.pkl
├── data/

│ └── salary_data.csv
├── README.md
├── requirements.txt
└── .gitignore

⚙️ Installation & Setup:

🔹 Step 1: Clone the repository

git clone https://github.com/yourusername/employee-salary-prediction.git cd employee-salary-prediction

🔹 Step 2: Install dependencies

pip install -r requirements.txt Or manually: pip install streamlit scikit-learn pandas joblib pyngrok

🔹 Step 3: Train the model (if not already trained) python train_model.py This generates a model.pkl file.

🔹 Step 4: Run the Streamlit app streamlit run app.py

🚀 How to Use:

  • Open the app in your browser (usually at http://localhost:8501)
  • Input the employee's experience (in years) and other fields
  • Click Predict Salary
  • View the estimated salary output instantly

🔍 Model Details:

  • Algorithm: Linear Regression
  • Input Features:
  • Years of Experience
  • (Optional) Job Title, Skills, Degree (can be extended)
  • Output: Predicted annual salary in INR/USD
  • Training: Scikit-learn pipeline with preprocessing and model fitting
  • Storage: Saved using joblib as model.pkl

🌐 Deployment:

To make the app publicly accessible using ngrok:

🔸 Install ngrok pip install pyngrok

🔸 Start Streamlit app (Terminal 1) streamlit run app.py

🔸 Start ngrok tunnel (Terminal 2) ngrok http 8501 Copy the generated HTTPS link to access the app publicly.

🖼️ Screenshots:

Screenshot 2025-07-24 144620 Screenshot 2025-07-24 144702 Screenshot 2025-07-24 144937 Screenshot 2025-07-24 144927 Screenshot 2025-07-24 144858 Screenshot 2025-07-24 144845 Screenshot 2025-07-24 144733 Screenshot 2025-07-24 165649

📌 Future Enhancements:

Add support for job title, domain, and location Use more advanced ML models like Random Forest or XGBoost Deploy on platforms like Streamlit Cloud, Render, or Heroku Add data visualizations using Plotly/Altair

🧑‍💻 Author:

Soundarya 🎓 Computer Science and Engineering Specialization in Artificial Intelligence and Machine Learning, Sarala Birla University 🌐 LinkedIn: https://www.linkedin.com/in/soundarya-60b330288/ | GitHub

📜 License:

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published