Skip to content

A curated collection of practical AI projects implementing OCR systems, RAG, AI agents, and other AI use cases.

3.0 KB
Raw Blame

Video Understanding Agent

Paste a YouTube URL and get an AI-powered chapter summary, key takeaways, and action items, powered by Gemini 3 Flash.

Demo

Demo

Overview

Video Understanding Agent lets you drop any public YouTube URL into a Streamlit interface and receive a structured breakdown of the video in seconds. Gemini 3 Flash reads the video natively through the Gemini API. No downloading, no transcription, no third-party tools.

Features

  • Chapter-by-chapter summary with timestamps for each major segment
  • Key takeaways: 5–8 bullet points covering the most important insights
  • Action items: 4–6 concrete steps the viewer can act on immediately
  • Clean, expandable sections in a Streamlit UI
  • Input validation rejects private, unavailable, or malformed URLs with clear error messages

Tech Stack

Layer Tool
AI Model Gemini 3 Flash (gemini-3-flash-preview)
AI SDK Google Gen AI SDK (google-genai)
UI Streamlit
Environment python-dotenv

Prerequisites

Installation

1. Clone the repository

git clone https://github.com/Sumanth077/Hands-On-AI-Engineering.git
cd Hands-On-AI-Engineering/multimodal/video_understanding_agent

2. Create and activate a virtual environment

macOS / Linux:

python3 -m venv venv
source venv/bin/activate

Windows:

python -m venv venv
venv\Scripts\activate

3. Install dependencies

pip install -r requirements.txt

4. Configure your API key

cp .env.example .env

Open .env and replace your_key_here with your Gemini API key.

Usage

streamlit run app.py

Open the local URL printed in the terminal (typically http://localhost:8501), paste a public YouTube URL, and click Analyze Video.

Example

Input:

https://www.youtube.com/watch?v=dQw4w9WgXcQ

Output:

Chapter-by-Chapter Summary

  • 0:00 - Introduction: The video opens with an energetic hook establishing the central theme...
  • 1:12 - Main Segment: The speaker dives into the core content, covering...

Key Takeaways

  • The most important insight from the video is...
  • A secondary pattern worth noting is...

Action Items & Recommendations

  • Start by doing X within the next 24 hours...
  • Follow up with Y to reinforce the concept...

Environment Variables

Variable Description Where to get it
GEMINI_API_KEY API key for Gemini models aistudio.google.com

Project Structure

video-understanding-agent/
├── app.py              # Streamlit app: UI, validation, Gemini API call, response parsing
├── requirements.txt    # Python dependencies
├── .env.example        # Template for environment variables
└── .env                # Your local secrets (not committed)

Back to top