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.
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.
| 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) |
python -m venv titanic_pred venv\Scripts\activate # On Windows
source venv/bin/activate # On macOS/Linux
pip install -r requirements.txt
cd backend python app.py
in a new terminal cd frontend streamlit run app.py