This project is a web-based rainfall prediction system built using Django and a trained Machine Learning model. The system takes in input features like temperature, precipitation, and wind speed to predict whether it will rain. The ML model is trained using logistic regression and integrated into the web app via a .pkl file.
- Backend: Django (Python)
- Machine Learning: Scikit-learn (Logistic Regression)
- Frontend: HTML (Django templates), CSS (static styling)
- Model Deployment: joblib for loading the serialized model
- Database: SQLite3 (default for Django projects)
The Jupyter notebook Rainfall Prediction.ipynb contains:
Data cleaning and preprocessing steps
Feature selection and target definition
Logistic Regression model training and evaluation
Exporting the final trained model using joblib
You can open this notebook to explore the entire model development process.
git clone https://github.com/notRamish/rainfall-predictor.git
cd rainfall-predictorpython -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activatepip install -r requirements.txtpython manage.py runserverThen open your browser and visit:
http://127.0.0.1:8000/Fill in the form fields (temp, precip, wind, etc.)
Click "Predict"
View prediction result (Rain / No Rain)
Trained using logistic regression on historical weather data.
Feature engineering and training steps are documented in rainfall_prediction.ipynb.
The final model is saved as model/model.pkl.
This project was built for educational/demo purposes.
You can improve it by replacing the model, adding feature scaling, or connecting to a real-time weather API.
Mohammad Ramish Anwar
- Feel free to fork, use, or improve this project!