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