Skip to content

Video Summarizer using Local LLM (facebook/bart-large-cnn). Submit a YouTube URL and get an AI-generated summary of the video.

License

Notifications You must be signed in to change notification settings

Mielone2Good/VideoSummarizerAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues License LinkedIn


Python Logo

Video Summarizer using Local LLM (facebook/bart-large-cnn)

Submit a YouTube URL and get an AI-generated summary of the video.
Explore the code »

View Demo · Report Bug · Request Feature


📌 About The Project

This project allows you to generate AI-powered summaries of YouTube videos using the facebook/bart-large-cnn local language model. You just send a video URL to the FastAPI endpoint, and within ~8 seconds (depending on your GPU), you get a clean summary of the content.

💡 It works even for long transcripts or complex documents.

Version 1.1

📃 Added Gradio Frontend ⚙️ You can now select summary length:

  • very short
  • short
  • normal
  • long
  • very long

🔍 How it works

  1. Transcript download using get_transcript.
  2. Chunking of the text for better LLM input.
  3. Chunk-wise summarization with facebook/bart-large-cnn.
  4. Merging summaries into a final summary.
  5. Exposed via API endpoint:
    GET /summarize-video?url=YOUR_YOUTUBE_URL

⚙️ Structure

  • ai_core.py: Handles tokenization and LLM model logic
  • ai_algorithm.py: Chunking and hierarchical summarization logic
  • get_transcript.py: Retrieves transcript from YouTube
  • api.py: FastAPI web server exposing the summarization endpoint
  • tests/: Unit tests for core components

🚀 Built With


🧪 Unit Tests

This repo contains a full suite of unit tests for the AI pipeline logic to ensure consistency and reliability.

Run them using:

python -m Backend.tests.unit_test

🚫 License

This project is licensed under CC BY-NC 4.0. That means:

  • ✅ Free for non-commercial use
  • ✅ Attribution required (mention the author)
  • Commercial use is forbidden

Author: Mikołaj Jaros. (aka MixDevv) LinkedIn


🙏 Acknowledgments


📷 Screenshots

Gradio Frontend - Test on Iphone Ad, Short summary mode

Zrzut ekranu 2025-07-30 231911

Gradio Frontend - Test on Iphone Ad, Very long summary mode

Zrzut ekranu 2025-07-30 231938

Request Sent - Test on iPhone Ad

RequestSent_test_on_phone_ad This screenshot shows the app sending a request and receiving a response from the server, highlighting the GPU usage during processing.

Test Result on iPhone Ad

TestResult_PhoneAd A detailed view of the server response corresponding to the previous request, showing the summarized content returned by the API.

Unit Tests - Shopify Tutorial

UnitTests_ShopifyTutorial Demonstrates the successful execution of unit tests, ensuring the app's core functionalities work correctly.

About

Video Summarizer using Local LLM (facebook/bart-large-cnn). Submit a YouTube URL and get an AI-generated summary of the video.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages