Skip to content

Latest commit

 

History

History
88 lines (70 loc) · 1.99 KB

README.md

File metadata and controls

88 lines (70 loc) · 1.99 KB

IPL Score Predictor

This is a Streamlit web application that predicts the total runs at the end of the 6th over in a cricket match. The prediction is based on inputs such as the batting team, bowling team, venue, inning, toss winner, toss decision, and wickets at the end of the 6th over. The app uses a machine learning model built with scikit-learn.

Requirements

  • Python 3.7 or higher ( 3.10 Recommended )
  • Streamlit
  • scikit-learn
  • pandas

Features

User Inputs:

  • Batting team
  • Bowling team
  • Venue
  • Toss winner status
  • Toss decision
  • Wickets at the end of the 6th over

Output:

  • Predicted total runs at the end of the 6th over

Setup

Create Virtual Environment

Create a virtual environment

python -m venv env

Activate the environment

For windows

env\Scripts\activate

For linux

source env/bin/activate

Install dependencies

pip install -r requirements.txt

Extract Data

Extract data by running the extract_data.py script:

python extract_data.py

Preprocess Data

Preprocess data by running the preprocess_data.py script:

python preprocess_data.py

Train Machine Learning Model

Train the machine learning model by running train.py script:

python train.py

Usage

Run the app

Run the streamlit app and access the url http://localhost:8501:

streamlit run app.py

Project Structure

IPL Score Predictor/
├── app.py               # Streamlit app script
├── extract_data.py      # Data extraction script
├── preprocess_data.py   # Data preprocessing script
├── train.py             # Model training script
├── transformer.joblib   # Trained column transformer pipeline
├── model.joblib         # Trained machine learning model
├── ipl_data.zip         # Historical match data for training
├── requirements.txt     # Python packages required
└── README.md            # Project documentation