Water Quality Prediction System – A Smart Web-Based ML Application
Water Quality Prediction System
I made this Water Quality Prediction System, which is basically a website made with Python and Flask that uses machine learning to tell if water is safe to drink. You just enter some details about the water, and it quickly tells you if it’s drinkable or not using a trained model.It’s meant for researchers, developers, and institutions, and it gives real-time results right in your browser. The system uses a Voting Classifier algorithm that was trained on water quality data, and it works smoothly with the Flask backend.The main idea is to make it easier for people to use environmental data for decisions, so anyone can check water safety directly through machine learning.
Project Summary Table
Project Name | Water Quality Prediction System |
---|---|
Language/s Used | Python, HTML, CSS, JavaScript |
Type | Web Application |
Download New Real Time Projects :-Click here
Available Features
Based strictly on the zip file contents and implemented functionality, the system provides the following features:
Smart Prediction
- Allows users to input nine essential water quality parameters:
- pH
- Hardness
- Total Dissolved Solids
- Chloramines
- Sulfate
- Conductivity
- Organic Carbon
- Trihalomethanes
- Turbidity
- Provides real-time feedback on water potability using a pre-trained Voting Classifier model.
- The model delivers an accuracy of approximately 75% to 80% as observed in test cases.
User-Friendly Web Interface
- A clean and responsive frontend interface built using HTML, CSS, and JavaScript.
- Users can easily navigate to different sections including:
- Home
- Prediction Form
- Result Page
- About
- Blog
- Contact
- Interactive prediction form that instantly returns results based on input values.
- No login or account setup required, making it a plug-and-play application.
Machine Learning Integration
- Backend built with Flask (Python)
- Uses scikit-learn for the machine learning logic
- Model is saved as
voting_classifier_model.pkl
and loaded in the Flask app - Reads data from
water_potability.csv
and does not require an external database
Static & Template Design
- Organized folder structure for static files and HTML templates:
static/images/
contains all media used in the frontendtemplates/
includes separate HTML files for each webpage:index.html
,predict.html
,result.html
, andcontact.html
Technical Stack
This project uses the following tools and libraries:
- Backend: Flask (Python 3.7+)
- Frontend: HTML, CSS, JavaScript
- Machine Learning: scikit-learn 0.24+
- Data Processing: pandas, numpy
- Model Used: Voting Classifier (combining multiple ML algorithms)
How to Set Up and Run the Project
Follow the steps below to run the Water Quality Prediction System on your local machine:
1. Extract the Project
Download and extract the ZIP file to your desired folder.
2. Set Up Python Environment
Open your terminal or command prompt and navigate to the project directory.
Create a virtual environment and activate it:
On Windows:
python -m venv venv
venv\Scripts\activate
On macOS/Linux:
python3 -m venv venv
source venv/bin/activate
3. Install Required Dependencies
Once inside the environment, install the required libraries:
pip install -r requirements.txt
This includes Flask, scikit-learn, pandas, and numpy.
4. Run the Application
Use the command below to start the Flask application:
python app.py
By default, the app runs on http://localhost:5000
.
5. Use the System
Open your browser and go to http://localhost:5000
to access the application. You can now:
- Navigate to the prediction form
- Enter values for water quality parameters
- Get instant results about whether the water is potable
Project Structure
water-quality-analysis/
├── static/
│ └── images/
├── templates/
│ ├── index.html
│ ├── predict.html
│ ├── result.html
│ ├── about.html
│ ├── blog.html
│ └── contact.html
├── app.py
├── voting_classifier_model.pkl
├── water_potability.csv
├── requirements.txt
This clear modular structure ensures easy navigation, development, and deployment.
Model Performance
The Voting Classifier model used in this application has been trained on a comprehensive dataset and tested for real-world accuracy.
- Accuracy: 75% – 80%
- Prediction Time: Near-instantaneous for a single input
- Model File:
voting_classifier_model.pkl
The model combines multiple algorithms to ensure stable and consistent predictions based on input parameters.
We have projects Available in all languages:–Click Here
water quality prediction using machine learning github
water quality prediction using machine learning project report
water quality prediction using machine learning ppt
water quality prediction using machine learning research papers
water quality prediction using machine learning source code
water quality prediction using machine learning kaggle
water quality prediction using machine learning pdf
water quality prediction using deep learning
water quality prediction system using machine learning github
water quality prediction system using machine learning ppt
water quality prediction system using machine learning project
water quality prediction system using machine learning pdf
water quality prediction system using machine learning in python
Post Comment