Skip to content

jarif87/ipl-win-predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IPL Win Predictor 🏏

Overview

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.

Features

  • 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

Prerequisites

  • Python 3.11.9
  • Git
  • Heroku CLI
  • catboostclassifier.pkl (pre-trained model)

Installation

# 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

requirements.txt

numpy==1.26.4
scikit-learn=1.2.2
catboost==1.2.8
pandas
streamlit


Verify Model

Ensure catboostclassifier.pkl is in E:\Ipl.

Usage

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.

Project Structure

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

Procfile

web: streamlit run app.py --server.port $PORT

About

The IPL Win Predictor is a Streamlit app that uses a CatBoost model to predict IPL match win probabilities based on teams, city, score, overs, and wickets. It features a high-contrast UI and is Heroku-deployable.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors