This web application predicts a salary based on the number of years of experience using a linear regression model. The application is built using Flask, a Python web framework.
Before using the Salary Prediction web application, ensure you have the following installed:
- Python (3.6 or higher)
- Flask
- scikit-learn
- pandas
-
Clone the repository:
git clone https://github.com/Alwin-Sajan/Salary_Prediction_ML.git
-
Navigate to the project directory:
cd Salary_Prediction_ML
-
Install dependencies:
pip install -r requirements.txt
-
Run the Flask application:
python app.py
-
Open your web browser and go to
http://127.0.0.1:5000/
. -
Enter the number of years of experience and click the "Predict Salary" button.
- app.py: The main Flask application file.
- templates/index.html: HTML template for the web page.
- Salary_data.csv: Dataset containing information about years of experience and corresponding salaries.
The following Python libraries are used in this project:
- Flask: Web application framework.
- pandas: Data manipulation library.
- scikit-learn: Machine learning library for linear regression.
- The linear regression model is trained on the provided dataset (
Salary_data.csv
). - This application is for educational purposes, and additional considerations are needed for a production environment.
- Implement user authentication and authorization.
- Improve the front-end for a more user-friendly experience.
- Enhance error handling and input validation.
- Consider deploying the application to a production server.