Skip to content

m-ahmad-butt/Captain-Co

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Cricket Commentary Generator

AI Cricket Commentary Generator is an end-to-end analytical and generative tool designed to produce professional, context-aware cricket broadcasting commentary from match delivery metadata. It processes complex match variables including batter/bowler dynamics, run rates, and dismissal types—to generate rich, sub-second commentary synced with high-fidelity regional voice synthesis.
Deployed: https://m-ahmad-butt-cricket-commentary.hf.space/format

Demo Screenshots

Main Dashboard Match Simulation Live Commentary HUD Voice Selection & Settings System Overview Technical Snapshot Performance Metrics Match Analysis Session Review

Hugging Face Configuration

---
title: Cricket Commentary AI
emoji: 🏏
colorFrom: green
colorTo: emerald
sdk: docker
model_id: m-ahmad-butt/cricket-commentary-model
dataset_id: m-ahmad-butt/cricket
space_url: https://huggingface.co/spaces/m-ahmad-butt/cricket-commentary
---

Performance Overview

The commentary engine (v1) utilizes Qwen2.5-1.5B with QLoRA optimization.

Optimization Metrics

Metric Configuration Impact
Quantization NF4 (4-Bit) 68% Reduction in VRAM usage
P-Precision BF16/FP16 Mixed Preserves 99%+ generation quality
Inference Speed Unsloth Kernels < 450ms Total Latency per delivery
VRAM Footprint Specialized Adapters Optimized for 8GB+ GPU environments

Project Ecosystem (Hugging Face)

Component Repository Access
Dataset cricket-commentary-dataset 20,000+ Ball-by-ball logs
Model cricket-commentary-model Qwen2.5-1.5B Optimized Adapter
Space Cricket-Commentary Demo Interactive Web Interface

Technical Implementation

Core Architecture

  • Base Model: Qwen2.5-1.5B-Instruct (Decoder-only Transformer)
  • Fine-Tuning: Low-Rank Adaptation (LoRA) via Unsloth
  • Inference Engine: FastAPI with custom Triton kernels
  • Voice Synthesis: Microsoft Edge-TTS (Multi-regional accents: British, Indian, Australian)
  • Frontend: React.js with Vite for high-performance HUD updates

Setup

1. Environment Configuration

Establish the local development environment:

# Create virtual environment
python -m venv venv

# Activate environment
venv\Scripts\activate

2. Jupyter Notebook

Dependencies, Pre processing and model training are handled within the core notebook. Execute the notebook cells sequentially to install the specialized kernels (Unsloth) and fine-tune the model:

  1. Open Cricket-Commentary/model.ipynb.
  2. Execute the Cells one by one.

3. Application Deployment

Launch the full stack for local or remote inference.

Backend Inference Service

Start the FastAPI server to handle metadata serialization and voice generation:

cd Cricket-Commentary
python server.py

Servers live at http://localhost:8000

Frontend Dashboard

Initialize the React simulation interface:

cd frontend
npm install
npm run dev

Access interface at http://localhost:5173

License

This project is developed for educational purposes only.

About

Fine tuned qwen llm using qloRa for commentary generation and generating audio using edge-tts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors