A full-stack machine learning project for predicting house prices.
This project integrates Flask (backend API) and Next.js/Bun (frontend) to provide real-time house price predictions based on user inputs.
The goal of this project is to demonstrate model deployment using a modern workflow:
- Train regression models on a house dataset
- Build a Flask REST API for model inference
- Develop a Next.js/Bun frontend for interaction
- Integrate backend & frontend for real-time predictions
- Machine Learning Models: Linear Regression & Random Forest
- Prediction Pipeline: Feature engineering + trained models
- Flask API: Serves predictions via REST endpoints
- Next.js/Bun Frontend: User-friendly client for input & results
- Full Deployment: Backend + frontend + models + dataset included
house-price-prediction/
│── backend/ # Flask API code
│ ├── app.py # Main API script
│ ├── models/ # Trained ML models
│ ├── requirements.txt # Python dependencies
│ └── dataset/ # Cleaned dataset
│
│── frontend/ # Next.js + Bun app
│ ├── pages/ # Frontend pages
│ ├── components/ # Reusable UI components
│ └── package.json # Dependencies
│
│── README.md # Project documentation
cd backend
pip install -r requirements.txt
python app.pyAPI will run on: http://127.0.0.1:5000/
cd frontend
bun install
bun devFrontend will run on: http://localhost:3000/
Send a POST request with house features to the Flask API:
POST /predict
Content-Type: application/json
{
"area": 2000,
"bedrooms": 3,
"bathrooms": 2,
"location": "Downtown"
}Response:
{
"predicted_price": 250000
}- Full code and dataset are available on GitHub:
House Price Prediction Repository - Both backend & frontend can be run locally by following the steps above
- Includes: source code, trained models, dataset, and documentation
- Code is clean and modular following best practices
- Each commit in GitHub has a clear message for traceability
- Project README explains setup, usage, and licensing
This project is licensed under the MIT License – free to use and modify.