IPL Match Win Predictor is a Streamlit web app that predicts the winning probability of an IPL team during a run chase. The app uses a trained machine learning pipeline saved in pipe.pkl and takes live match inputs such as batting team, bowling team, city, target, score, overs, and wickets.
- Predicts win probability for the batting and bowling teams.
- Simple Streamlit user interface.
- Uses match situation inputs from the second innings.
- Loads a pre-trained machine learning model from
pipe.pkl. - Includes IPL teams and host cities supported by the trained model.
IPL-Match-Win-Predictor/
|-- app.py
|-- pipe.pkl
|-- matches.csv
|-- deliveries.csv
|-- ipl-win-predictor.ipynb
|-- requirements.txt
`-- README.md
- Python 3.10 or newer
- pip
- Virtual environment support through
venv
Python 3.13.5 was used during local setup.
Open PowerShell in the project folder and run:
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install -r requirements.txtIf PowerShell blocks activation scripts, run this command in the same terminal:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy BypassThen activate the virtual environment again:
.\.venv\Scripts\Activate.ps1Start the Streamlit app with:
streamlit run app.pyOpen the local URL shown in the terminal. It is usually:
http://localhost:8501
Keep the terminal open while using the app. To stop the server, press Ctrl+C.
- Select the batting team.
- Select the bowling team.
- Select the host city.
- Enter the target score.
- Enter the current score.
- Enter completed overs.
- Enter wickets lost.
- Click
Predict Probability.
The app will show the predicted winning probability for both teams.
pipe.pklcontains the trained prediction pipeline.matches.csvanddeliveries.csvcontain IPL match and ball-by-ball data.ipl-win-predictor.ipynbcontains the notebook used for data exploration, feature engineering, and model training.
If dependencies are missing, reinstall them:
python -m pip install -r requirements.txtIf streamlit is not recognized, make sure the virtual environment is active:
.\.venv\Scripts\Activate.ps1If the model fails to load, verify that pipe.pkl is present in the same folder as app.py.