This project uses a machine learning model based on the Random Forest algorithm to predict floods. The application is a web-based solution where users can interact with the model through a Node.js and Express.js backend. The model's predictions are made by a Python Flask server that processes the data and sends it back to the Node.js server for rendering and display.
This application leverages machine learning to predict floods using a trained Random Forest model. Users interact with the web app by sending a request with input data, which is processed by the Python Flask server where the ML model makes predictions. The results are then rendered on the front-end using EJS templates.
- User Interaction: The user submits a request through the Node.js web application.
- Request Handling: The request is forwarded to a Python Flask server.
- Prediction: The Flask server processes the request, passes it through the trained Random Forest model, and returns the predicted results.
- Display: The Node.js server receives the prediction and renders it on the web page using EJS templates.
- Flood Prediction: Predicts the likelihood of floods based on the provided data.
- User-Friendly Interface: A simple web interface that displays the prediction results to the user.
- Real-time Processing: Fast prediction using the Random Forest model.
- Backend: Node.js, Express.js
- Frontend: EJS (Embedded JavaScript templates)
- Machine Learning: Python, Flask, Random Forest Algorithm (using
scikit-learn) - Deployment: Local or cloud servers for Node.js and Python Flask
- Communication: HTTP requests between Node.js and Flask servers
Ensure you have the following installed:
- Node.js
- Python 3.x
- pip (Python package installer)
- Dependencies (listed below)
- express: A fast, unopinionated, minimalist web framework for Node.js.
- ejs: A simple templating engine for rendering HTML views with embedded JavaScript.
- path: Provides utilities for working with file and directory paths.
- body-parser: Middleware to parse incoming request bodies.
- cors: A package to enable Cross-Origin Resource Sharing.
- axios: Promise-based HTTP client for making requests from the browser or Node.js.
- scikit-learn: A Python module for machine learning, providing simple and efficient tools for data mining and data analysis.
- pickle5: A backport of the
picklemodule used for serializing and deserializing Python objects, particularly the trained machine learning model. - flask: A lightweight WSGI web application framework in Python.
- dotenv: A module to load environment variables from a
.envfile. - os: A Python module for interacting with the operating system, such as file and directory handling.
- pandas: A fast, powerful, flexible, and easy-to-use open-source data analysis and manipulation tool.
git clone git@github.com:s123dhara/Flood-Prediction-Using-ML-Model-Minor-Project-.git
cd Flood Prediction Using ML Model Minor Project







