Welcome to the My Sweet Home repository, which is a House Price Prediction and Property Recommendation Flask app repository! This app is designed to predict house prices and recommend similar housing properties based on a saved dataset (using content-based filtering). Whether you are a homebuyer looking for your dream house or a real estate investor seeking lucrative opportunities, this app can help you make informed decisions.
The goal is to predict the price of a given Housing Property (Regression Analysis) and also to recommend 6 similar Housing Properties (Content-Based Filtering).
There are 70 independent variables in the raw data, I am here explaining only the important features ( 7 features ) used for feature engineering and model prediction. (To make the task easier I have joined bedroom and bathroom feature as BHK for model prediction and recommendation, Although You can modify it as you like):
-
propertyType: The type or category of the house or property (e.g., apartment, villa, commercial).
-
locality: The specific locality or neighborhood where the house or property is located.
-
furnishing: The level of furnishing provided in the house or property (e.g., fully furnished, semi-furnished, unfurnished).
-
city: Location of the property, setting the context for its surroundings and amenities.
-
bedrooms: Number of sleeping spaces available in the property for residents.
-
bathrooms: Count of bathing facilities in the property, indicating convenience and functionality.
-
RentOrSale: Specifies whether the property is available for rent or sale, defining its market status.
- exactPrice : The exact price of the house or property.
Dataset Source Link : https://www.kaggle.com/datasets/rajarshiroy0123/house-prices-in-india-2023
To understand about the feature engineering and model prediction for this particular dataset please refer to the following:
Kaggle Notebook : https://www.kaggle.com/code/rajarshiroy0123/indian-house-price-prediction
- Python
- Flask
- HTML and CSS
- Scikit-learn
- DVC
- MLFlow
- Docker
- Github Actions
- AWS ECR
- AWS EC2
Predicted and recommended Output :
These are some required packages for our program which are mentioned in the Requirements.txt file
- pandas
- numpy
- seaborn
- matplotlib
- scikit-learn
- catboost
- xgboost
- Flask
- dill
- requests
- beautifulsoup4
- bs4
- jinja2
- joblib
- librosa
- lxml
I have commented most of the neccesary information in the respective files.
To run this project locally, please follow these steps:-
-
Clone the repository:
git clone https://github.com/Rajarshi12321/My-Sweet-Home.git
-
Create a Virtual Environment (Optional but recommended) It's a good practice to create a virtual environment to manage project dependencies. Run the following command:
conda create -p <Environment_Name> python==<python version> -y
Example:
conda create -p housing python=3.8 -y
-
Activate the Virtual Environment (Optional) Activate the virtual environment based on your operating system:
conda activate <Environment_Name>/
Example:
conda activate housing/
-
Install Dependencies
- Navigate to the project directory:
cd [project_directory]
- Run the following command to install project dependencies:
pip install -r requirements.txt
Ensure you have Python installed on your system (Python 3.9 or higher is recommended).
Once the dependencies are installed, you're ready to use the project. - Navigate to the project directory:
-
Run the Flask app: Execute the following code in your terminal.
python app.py
-
Access the app: Open your web browser and navigate to http://127.0.0.1:5000/ to use the House Price Prediction and Property Recommendation app.
(Additional Functionality)
- You can use your own data and form the datasets as per your liking using the pipelines, Change the source of the dataset in data ingestion pipeline in the file directory
src/components/data_ingestion.py
- Run the following codes to make your clean, proprocess and make model based on your date (Modify the pre processing pipleline and model making pipeline based on your required result for your project)
python src/components/data_ingestion.py python src/components/data_transformation.py python src/components/model_trainer.py
- Modify the index.html, home.html and app.py to suit your required features.
These file directories are:
app.py
templates/home.html
templates/index.html
-
House Price Prediction: On the app's homepage, users can input the specific features of the house they are interested in. After submitting the details, the app will process the information and display the predicted price for the house.
-
Property Recommendation: Along with the house price predictions users will also get similar recommendation. The app will provide a list of 6 most similar properties that match the given criteria.
I welcome contributions to improve the functionality and performance of the app. If you'd like to contribute, please follow these guidelines:
-
Fork the repository and create a new branch for your feature or bug fix.
-
Make your changes and ensure that the code is well-documented.
-
Test your changes thoroughly to maintain app reliability.
-
Create a pull request, detailing the purpose and changes made in your contribution.
Rajarshi Roy - royrajarshi0123@gmail.com
This project is licensed under the MIT License. Feel free to modify and distribute it as per the terms of the license.
I hope this README provides you with the necessary information to get started with the Housing Price Prediction and Recommending project.
I took reference from:
-
Krish Naik sir's YouTube Playlist.
-
Complete End to End Deep Learning Project With MLFLOW,DVC And Deployment YouTube video.
-
Kidney-Disease-Classification-MLflow-DVC Github Repo.