Skip to content

afrrooz/car-mpg-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

This project predicts the Miles Per Gallon (MPG) of a car using its specifications such as cylinders, horsepower, displacement, and weight.
It combines a Flask backend API (for model prediction) and a Streamlit frontend (for user interaction) to create a complete end-to-end machine learning web application.


Overview

The goal of this project is to predict a car's fuel efficiency (MPG) based on several input features.
It demonstrates the integration of:

  • A trained machine learning model (built using scikit-learn)
  • A Flask REST API to serve the model
  • A Streamlit interface for easy user interaction

This type of architecture is commonly used in deploying machine learning projects to production.


🛠️ Tech Stack

Layer Technology Used
Programming Language Python
Frontend Streamlit
Backend Flask
ML Library scikit-learn
Data Handling pandas, numpy
Model Storage joblib
Visualization matplotlib / seaborn (optional)

Create virtual environment

python -m venv titanic_pred venv\Scripts\activate # On Windows

or

source venv/bin/activate # On macOS/Linux

Install dependencies

pip install -r requirements.txt

Running the Application

cd backend python app.py

Start the Streamlit frontend

in a new terminal cd frontend streamlit run app.py

About

A simple Flask + Streamlit app to predict car MPG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors