SummarizeVideo - Unlock the Summary of a Youtube Video in Seconds

SummarizeVideo - Unlock the Summary of a Youtube Video in Seconds

How I solved the problem of Generating summary of a youtube video using MindsDB

ยท

4 min read

Introduction

SummarizeVideo is an open-source project which is powered by MindsDB. This is developed during the Hackathon of MindsDB and Hashnode

In this article, I will share my experience in picking the problem statement & arriving at the right solution and how I moved it to implementation. While I was at it, how I enjoyed & had fun during the whole process.

So without further ado, Let's dive right in.

Problem Statement

In today's fast-paced world, we often find ourselves short on time to watch lengthy videos on YouTube. The problem that many people face while browsing YouTube is the lack of time to watch lengthy videos, which often contain valuable information.

This can be frustrating, especially when you are trying to learn something new or keep up with the latest trends.

Even if you do manage to find the time, it can be difficult to skim through the video to find the most important points. This problem is compounded by the fact that YouTube does not offer a built-in tool for summarizing videos.

Solution Proposed

This is where SummarizeVideo comes in as a solution to the problem, providing a quick and efficient way to unlock the summary of a YouTube video in seconds.
This tool will allow users to quickly skim through the key points and highlights of a video, saving them time and energy.

Design of the Project

The design conceived for the implementation of this project is listed below

  • Get the input of the youtube video URL from the user

  • After getting the input from the user, there should be a validation check which needs to be run on both the client & server side.

  • Once the validation is done, there should be a check whether the particular video has English transcription available. If not, the same should be communicated to the user & ask them to input another video to generate summary

  • After validation, the transcript input needs to be passed to MindsDB ML Model through MindsDB SDK

  • There is one more case; for some video transcripts, the model prediction returns the below error.
    HTTPError: 500 Server Error: INTERNAL SERVER ERROR for url: https://cloud.mindsdb.com/api/projects/mindsdb/models/text_summary/predict

    Based on my initial investigation, these video contains chapters. The same should be communicated to the user & ask them to input another video to generate summary

Implementation

Log in to the MindsDB Cloud and create the below model

CREATE MODEL text_summary
PREDICT summary
USING
    engine = 'openai',              
    prompt_template = 'Summarize the given youtube video within 100 words in full sentences - {{transcript}}'

Run the above query to find the model status. Once the model is ready, using MindsDB SDK, you can query the model, get the predictions, etc...

Now, we have the ML backend engine, which is powered by MindsDB ready.
The next step is to create a front end using any popular front-end frameworks.

I have used the Django web framework for this project and designed the below page using HTML5 + CSS and linked this with the Django project.

Once the video summary is generated for a given video, the same is stored in the Postgre SQL database, and it will be fetched faster in the future when another user searches for the same video.

For the detailed implementation & tech stacks used, please visit to GitHub Repository of this project here and the URL of this project is here

Cool Screenshots

Here is the summary generated by SummarizeVideo for the TedTalk by Bill Gates

Here is the summary generated by SummarizeVideo for the MindsDB NLP Inside your Database

Video Demo

This video demo has summarized two videos from Hashnode & MindsDB Youtube channel

Conclusion

SummarizeVideo is a tool that can save you time and effort while browsing through YouTube videos. With its ability to unlock the summary of a video in just a few seconds, you can quickly skim through the most important points and highlights, without having to watch the entire video.

So, if you're tired of sifting through lengthy videos and want to make the most out of your time, give SummarizeVideo a try and unlock the summary of any YouTube video in seconds.

If you want to contribute to this project, you are most welcome! and finally, a big thank you for taking the time to read my article. Please support me by liking the article and sharing the article if you like it, and follow me for more related articles.

#mindsdb @mindsdb @hashnode #machinelearning #AI #datascience #mindsdbhackathon

Did you find this article valuable?

Support Balaji Seetharaman by becoming a sponsor. Any amount is appreciated!

ย