{"id":14958212,"url":"https://github.com/2003harsh/house-price-prediction-using-machine-learning","last_synced_at":"2026-01-04T13:48:05.535Z","repository":{"id":252080056,"uuid":"839363411","full_name":"2003HARSH/House-Price-Prediction-using-Machine-Learning","owner":"2003HARSH","description":"This project features a web app that predicts house prices using a linear regression model. Users can input details like location, square footage, bathrooms, and bedrooms through an HTML form. I've added a CI/CD pipeline with GitHub Actions, unit testing with pytest, and automated Docker containerization to improve deployment and robustness.","archived":false,"fork":false,"pushed_at":"2024-09-07T11:12:16.000Z","size":54312,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-31T02:03:40.311Z","etag":null,"topics":["ci-cd","data-analysis","docker-image","flask","linear-regression","machine-learning","matplotlib","mlops-workflow","requests","scikit-learn"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/2003harsh/house_price_prediction","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/2003HARSH.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-07T13:09:15.000Z","updated_at":"2024-09-09T06:30:36.000Z","dependencies_parsed_at":"2024-09-22T06:30:34.757Z","dependency_job_id":"974f2876-44b3-437a-b7ad-152aae802959","html_url":"https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.4137931034482759,"last_synced_commit":"2df0a42ebc9470904010d15ca26d661cad69d8ea"},"previous_names":["2003harsh/house-price-prediction-using-machine-learning"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003HARSH%2FHouse-Price-Prediction-using-Machine-Learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003HARSH%2FHouse-Price-Prediction-using-Machine-Learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003HARSH%2FHouse-Price-Prediction-using-Machine-Learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/2003HARSH%2FHouse-Price-Prediction-using-Machine-Learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/2003HARSH","download_url":"https://codeload.github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237982336,"owners_count":19397246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","data-analysis","docker-image","flask","linear-regression","machine-learning","matplotlib","mlops-workflow","requests","scikit-learn"],"created_at":"2024-09-24T13:16:28.932Z","updated_at":"2025-10-24T14:31:12.177Z","avatar_url":"https://github.com/2003HARSH.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# House Price Prediction uisng Machine Learning\n\n## Overview\n\nThis project implements a house price prediction model using linear regression, predicting prices based on features like location, total square feet, number of bathrooms, and bedrooms (BHK), with a Flask backend and a simple HTML frontend for user interaction. Building on the initial version, I've integrated a CI/CD pipeline using GitHub Actions for automated testing and deployment, added unit test cases with `pytest` to ensure code quality, and automated Docker containerization for consistent deployments across environments. These enhancements significantly improve the application's robustness, maintainability, and scalability, making it production-ready.\n\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/1.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/1.png)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/5.jpeg](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/5.jpeg)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/6.jpeg](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/6.jpeg)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/4.jpeg](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/4.jpeg)\n\n\n## Features\n\n- **Linear Regression Model**: Utilizes linear regression to predict house prices.\n- **Flask Backend**: Handles API requests and serves the prediction model.\n- **HTML Form**: Provides a user interface for inputting house details and receiving predictions.\n- **Experiment Tracking**: Integrated MLflow for tracking experiments, providing deeper insights into model performance.\n- **Hyperparameter Tuning**: Optimized model performance using GridSearchCV and Hyperopt.\n- **Interactive Visualizations**: Leveraged MLflow's web interface for visualizing and comparing experiment results.\n- **CI/CD Pipeline**: Implemented using GitHub Actions to automate testing and deployment.\n- **Unit Tests**: Developed test cases using `pytest` to ensure application reliability.\n- **Automated Docker Containerization**: Dockerized the application for easy deployment.\n\n## Technologies\n\n- **Python**: Core programming language.\n- **Flask**: Web framework for handling HTTP requests.\n- **scikit-learn**: Machine learning library used for model training.\n- **HTML/CSS/JavaScript**: Frontend technologies for creating a user interface.\n- **MLflow**: Tool for experiment tracking.\n- **GitHub Actions**: CI/CD for automated testing and deployment.\n- **Docker**: Containerization tool for packaging the application.\n\n## Installation\n\n### Prerequisites\n\nEnsure you have Python and pip installed on your system. You will also need the following Python libraries:\n\n- Flask\n- scikit-learn\n- pandas\n- numpy\n- matplotlib\n- pickle\n- mlflow\n\n\n### Clone the Repository\n\nClone this repository to your local machine:\n\n```bash\ngit clone https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning\ncd House-Price-Prediction-using-Machine-Learning\n```\nYou can install the required libraries using pip:\n\n```bash\npip install -r requirements.txt\n```\n\n## Running the Application\n\n### Start the Flask Server\n\nRun the Flask server with the following command:\n\n```bash\npython app.py\n```\n\nThe server will start and listen on `http://127.0.0.1:5000/` .\n\n### Using the HTML Form\n\nAfter the form is open enter the required values to get the output.\n\n---\n\n## **Installation using Docker**\n\n1. **Pull the Docker Image:**\n\n   ```sh\n   docker pull 2003harsh/house_price_prediction\n   ```\n\n2. **Run the Docker Container:**\n\n   ```sh\n   docker run -p 5000:5000 2003harsh/house_price_prediction\n   ```\n\n3. **Access the Application:**\n\n   Open your web browser and navigate to `http://localhost:5000` to use the app.\n\n---\n\n# Plots\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/1.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/1.png)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/2.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/2.png)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/3.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/3.png)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/4.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/4.png)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/6.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/6.png)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/7.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/7.png)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/8.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/8.png)\n![https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/9.png](https://github.com/2003HARSH/House-Price-Prediction-using-Machine-Learning/blob/main/artifacts/plots/9.png)\n\n---\n\n## API Endpoint\n\n### POST /predict\n\n**Description:** Receives house details and returns the predicted price.\n\n**Request Body:**\n\n```json\n{\n    \"location\": \"Sarjapur\",\n    \"total_sqft\": 1500,\n    \"bath\": 2,\n    \"bhk\": 3\n}\n```\n\n**Response:**\n\n```json\n{\n    \"predicted_price\": 550000.00\n}\n```\n\n## Project Structure\n\n- `app.py`: Flask backend script.\n- `model.pkl`: Serialized linear regression model.\n- `index.html`: Frontend HTML form for user input.\n- `README.md`: This file.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n## Contact\n\nFor any questions or issues, please contact [harshnkgupta@gmail.com](mailto:harshnkgupta@gmail.com).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003harsh%2Fhouse-price-prediction-using-machine-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F2003harsh%2Fhouse-price-prediction-using-machine-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F2003harsh%2Fhouse-price-prediction-using-machine-learning/lists"}