A Streamlit-based web app to predict IPL team win probabilities in real-time. Uses a CatBoost classifier with inputs like batting/bowling teams, city, target score, current score, overs, and wickets. Features a high-contrast UI with a white background and dark text for visibility.
- Interactive Streamlit UI for match details input
- Real-time win/loss probability predictions
- High-contrast design: white background (#ffffff), dark text (#333333), light blue results (#e6f3ff)
- Input validation (e.g., prevents same teams, invalid scores)
- Heroku-ready with Procfile and configuration
- Python 3.11.9
- Git
- Heroku CLI
- catboostclassifier.pkl (pre-trained model)
# Clone the repo or navigate to local directory
git clone https://github.com/your-username/ipl-win-predictor.git
cd ipl-win-predictor
# OR
cd E:\Ipl
# Create and activate virtual environment
python -m venv venv
.\venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
# Install dependencies from requirements.txt
pip install -r requirements.txt
numpy==1.26.4
scikit-learn=1.2.2
catboost==1.2.8
pandas
streamlit
Ensure catboostclassifier.pkl is in E:\Ipl.
streamlit run app.py
-
Open http://localhost:8501 in your browser.
-
Input match details:
-
Batting Team (e.g., Mumbai Indians)
-
Bowling Team (e.g., Chennai Super Kings)
-
City (e.g., Mumbai)
-
Target Score (e.g., 180)
-
Current Score (e.g., 100)
-
Overs Completed (e.g., 10.0)
-
Wickets Fallen (e.g., 3)
-
Click "Predict Probability" to see win/loss percentages.
-
ipl-win-predictor/
├── app.py # Streamlit app code
├── catboostclassifier.pkl # Pre-trained CatBoost model
├── Procfile # Heroku process file
├── requirements.txt # Dependencies
├── README.md # This file
web: streamlit run app.py --server.port $PORT