This project automates the extraction and analysis of YouTube videos related to professional League of Legends matches. The script connects to the YouTube API, retrieves the transcript of a given video, processes it, and sends it to GPT-4 with a carefully designed prompt. The LLM then generates an analytical summary that highlights key moments, plays, and strategic decisions. This tool is intended to help those who are not fully familiar with the game understand and enjoy professional matches.
To run the notebook, install the required dependencies:
pip install youtube_transcript_api openai gradio
Example function calls:
video_id = extract_video_id("https://www.youtube.com/watch?v=exampleID")
transcript = download_transcript(video_id)
summary = generate_match_summary(transcript)
To run the Gradio interface:
import gradio as gr
iface = gr.Interface(fn=generate_match_summary, inputs="text", outputs="text")
iface.launch()
export OPENAI_API_KEY='your-api-key-here'
This project is designed to bridge the gap for newcomers to League of Legends esports by providing high-quality, AI-generated summaries that explain matches in an accessible way.
This project is for educational and competitive use only. Please ensure compliance with YouTube's API policies and OpenAI's terms of use.
There are no datasets linked
There are no datasets linked