A machine learning-powered web application to predict final cricket scores based on:
- Current runs, overs played, wickets lost
- Batting team, bowling team, venue
- Smart features: run rate, projected score, pressure factor, death overs flag
✨ Built using Python, scikit-learn, and Streamlit.
🌐 Live Demo: cricketscorepredictionsystem.streamlit.app
✅ Predicts realistic final cricket scores (average, min & max)
✅ Shows upcoming overs prediction as bar graph
✅ Clean, modern, mobile-friendly UI
✅ View sample dataset
✅ Lightweight, fast, easy to deploy anywhere
git clone https://github.com/dhruvpatel16120/Cricket-Score-Prediction-System.git
cd Cricket-Score-Prediction-Systempython -m venv env
env\Scripts\activatepython3 -m venv env
source env/bin/activatepip install -r requirements.txtpython train_model.py
⚠️ Saves model & preprocessor todata/folder
streamlit run Cricket-Score-Prediction.pygo to http://localhost:8501
📂 data/
├── ipl.csv # Cleaned IPL dataset
├── best_model.pkl # Trained ML model
└── preprocessor.pkl # Saved preprocessor
📂 preview/ # Screenshots for README
train_model.py # Model training script
Cricket-Score-Prediction.py # Streamlit app
requirements.txt
README.md
LICENSE
.gitignore
- Train the model:
python train_model.py- Run the Streamlit app:
streamlit run Cricket-Score-Prediction.py- Open your browser:
Go to http://localhost:8501
| 🏏 Main UI | 📊 Prediction Output |
|---|---|
![]() |
![]() |
| 📈 Upcoming Overs Graph | 📂 View Dataset |
|---|---|
![]() |
![]() |
⚠️ Screenshots stored inpreview/folder)
- Gradient Boosting Regressor (lightweight, fast, robust)
- One-Hot Encoding for teams & venue
- Standard scaling for numerical features
- Smart derived features:
current_run_rateprojected_scorepressure_factoris_death_overs
- 🚀 Live App: cricketscorepredictionsystem.streamlit.app
- 📦 GitHub Repo: Cricket-Score-Prediction-System
- 🧑💻 Portfolio: dhruvpatelofficial.vercel.app
Contributions, ideas, bug reports and improvements are always welcome! 🚀
To contribute to this project:
-
Fork the repository
Click the Fork button at the top right of this page. -
Clone your fork locally:
git clone https://github.com/dhruvpatel16120/Cricket-Score-Prediction-System.git cd Cricket-Score-Prediction-System -
Create a new branch:
git checkout -b feature-branch
-
Make your changes
-
Commit your changes:
git commit -m "Add: meaningful description of your change" -
Push to your fork:
git push origin feature-branch
-
Open a Pull Request
Go to your fork on GitHub → click "Compare & pull request" → describe your changes → Create pull request.
✅ Tips for great contributions:
- Follow the existing code style & formatting
- Add helpful comments where needed
- Update
README.mdif you add or change features - Test everything locally before submitting
⭐ Thank you for helping improve this project! Your contribution makes it better for everyone. 🌱✨
- This project is licensed under the MIT License – see LICENSE.
Created by: Dhruv Patel
⭐ Star the repo if you like it!
💡 Feedback & suggestions are welcome!



