A FastAPI-powered REST API for predicting house prices using a trained machine learning model.
- Predict price for a single house (
/predict) - Predict prices for multiple houses (
/predict_batch) - Model training and evaluation in Jupyter notebook
- API testing notebook
git clone https://github.com/your-username/House-Prediction-API.git
cd House-Prediction-APIpip install -r requirements.txtuvicorn src.main:app --reload- Use
testing/test.ipynbto send requests and view predictions.
House-Prediction-API/
│
├── notebooks/
│ ├── model.ipynb # Jupyter notebook for model development
│ └── model.pkl # Trained model file
│
├── src/
│ ├── main.py # FastAPI application
│ └── __pycache__/ # Python cache files (can be ignored)
│
├── testing/
│ └── test.ipynb # Notebook for API testing
│
├── README.md # Project overview and instructions
├── requirements.txt # Python dependencies
└── .gitignore # Files/folders to ignore in git
notebooks/model.ipynb: Model development and training.notebooks/model.pkl: Saved model for inference.src/main.py: FastAPI app serving prediction endpoints.testing/test.ipynb: Example requests to the API.requirements.txt: List of required Python packages.
MIT