This model uses a Simple Linear Regression algorithm to learn the relationship between exercise duration and calories burned, and it is deployed via a Flask web application.
- Predict calories burned from exercise duration in minutes.
- Clean and simple code structure.
- Trained with Linear Regression for interpretability.
- Flask web interface for easy user interaction.
- Model stored using pickle for reusability.
CaloriesBurned-Prediction/
│
├── model.py
├── app.py
├── templates/
│ ├── index.html
│ └── result.html
├── static/
│ └── style.css
├── calories.csv
├── model.pkl
├── README.md
└── requirements.txt
-
Clone the repository:
git clone https://github.com/harshini202005/LinearRegression.git cd LinearRegressor -
Install dependencies:
pip install -r requirements.txt
The dataset contains the following columns:
- Minutes: Duration of exercise in minutes.
- CaloriesBurned: Total calories burned during the exercise.
Example:
| Minutes | CaloriesBurned |
|---|---|
| 5 | 25 |
| 10 | 50 |
| 15 | 75 |
Run the following command to train and save the model:
python model.pyThis will:
- Load the dataset.
- Train the Linear Regression model.
- Save the trained model as
model.pkl.
Start the Flask server:
python app.pyOpen your browser and go to:
http://127.0.0.1:5000
- Python 3.8+
- Flask
- Pandas
- NumPy
- Scikit-learn
Install all dependencies using:
pip install -r requirements.txtYou can try the model here: Calories Predictor Web App

