This repository contains a microservice for predicting housing prices based on machine learning models.
This microservice provides a REST API endpoint to predict housing prices. It utilizes a machine learning model trained on historical housing data to make predictions.
- To run this microservice locally, follow these steps:
git clone https://github.com/Ruban2205/housing-prediction-microservice.git
cd housing-prediction-microservice
- Install dependencies:
pip install -r requirements.txt
- Start the microservice
python app.py
The microservice will start running locally at http://localhost:5000
Endpoint
- POST
/predict
Request Body
The /predict
endpoint expects a JSON object with the following format:
{
"area": 1500,
"rooms": 3,
"age": 15
}
area
(integer): The area of the house in square feet.rooms
(integer): The number of rooms in the house.age
(integer): The age of the house in years.
Response
The endpoint responds with a JSON object containing the predicted price:
{
"predicted_price": 250000
}
Thank you for considering contributing to the Housing Prediction Microservice! Please follow these guidelines:
- Reporting Bugs: Search existing issues before reporting bugs.
- Enhancements: Suggest new features or improvements via GitHub issues.
- Code Contributions: Fork the repo, create a branch, and submit a pull request.
- Pull Requests: Ensure tests are added for new code. Get a sign-off before merging.
For deployment, ensure to set the necessary environment variables and configure the microservice to run in a production environment. This typically involves using a production-grade WSGI server like Gunicorn and setting up appropriate logging.
This project is licensed under the MIT License - see the LICENSE file for details.
Star ⭐ this repository for Future use 😊