IPL_Prediction / README.md
dine24's picture
Update README.md
716a83e verified

A newer version of the Streamlit SDK is available: 1.44.1

Upgrade
metadata
title: ๐Ÿ IPL Match Predictor & Simulator
emoji: ๐Ÿ
colorFrom: yellow
colorTo: blue
sdk: streamlit
sdk_version: 1.30.0
app_file: app.py
pinned: false
license: mit
tags:
  - cricket
  - ipl
  - deep-learning
  - streamlit
  - gru
  - prediction
  - sports
  - commentary

# ๐Ÿ IPL Match Predictor & Live Simulation App

Welcome to the **IPL Match Predictor** -- a powerful and interactive Streamlit-based application that simulates and predicts IPL match outcomes using machine learning, deep learning, and Generative AI commentary.

---

## ๐Ÿš€ Key Features

### ๐ŸŽฏ 1. IPL Score Prediction Dashboard (GRU-Based) - Predicts final match score using a GRU deep learning model. - Inputs: Over-wise runs and optional wickets (20 overs). - Model trained on synthetic match data to mimic real T20 dynamics.

### ๐Ÿง  2. GPT Commentary Generator (RAG-based, Optional) - Generate multi-turn AI commentary based on match progression. - Integrates GPT-3.5 (OpenAI) with retrieval-based chunked summaries. *(Optional deployment upgrade)*

### ๐Ÿงฎ 3. Match Scenario Simulator - Simulate custom match scenarios based on user-input cumulative scores. - Get final score predictions even with mid-match inputs.

### ๐Ÿ“Š 4. IPL Match Simulation + Points Table Logic - Team vs Team match generation with venue and status (Completed/In Progress/Scheduled). - Dynamic scorecard visualization with runs, wickets, and predicted outcomes.

### ๐Ÿ“ˆ 5. Live Match Predictor - Simulate full match: generates random over-wise runs + wickets. - Visualizes match progression and predicts final score with model confidence.

---

## ๐Ÿ“ Project Structure

final_app/ โ”‚ โ”œโ”€โ”€ app.py # โœ… Unified Streamlit app โ”œโ”€โ”€ requirements.txt # โœ… Dependencies for Hugging Face โ”œโ”€โ”€ trained_model/ # โœ… GRU-based models + scalers โ”œโ”€โ”€ match_live_predictor/ # โœ… Live match predictor files โ”œโ”€โ”€ match_simulator.py # Scenario-based simulator โ”œโ”€โ”€ *.h5 / .keras # DL models (GRU, BiLSTM, CNN, LSTM) โ”œโ”€โ”€ scaler_.save # Input/output scalers โ”œโ”€โ”€ *.csv # Match data for commentary, points, visuals โ”œโ”€โ”€ *.gif # Dashboard animations โ””โ”€โ”€ *.ipynb # Phase notebooks and analysis

---

## ๐Ÿ”ง Requirements

Install dependencies using:

```bash pip install -r requirements.txt

Model Info Model: GRU-based sequence predictor

Input: 20 timesteps (Runs, Wickets)

Output: Scaled prediction of final score

Scaler: MinMaxScaler fitted on input & target

GPT Commentary (Optional) To enable RAG-based GPT-3.5 commentary:

Set your OPENAI_API_KEY in Hugging Face secrets.

Add commentary loader and chunker for match summaries.

๐Ÿง‘โ€๐Ÿ’ป Built By ๐Ÿ‘จโ€๐Ÿ’ป Dinesh Kumar | Powered by Streamlit, TensorFlow, NumPy, Hugging Face, and Ope