Code Monkey home page Code Monkey logo

youtube-summarizer's Introduction

YouTube Summarizer

Summarize YouTube videos

How it works

  1. Input how many days' worth of videos (N) you want to summarize.
  2. Input which channel C to summarize.
  3. Download N days of video audio from channel C.
  4. Detect language and perform text-to-speech on those videos.
  5. Generate multiple summaries:
  • A summary for each video
  • An overall summary for all videos.

Setup

Environment

mkdir .venv
python -m venv ./.venv
source .venv/bin/activate
pip install --upgrade pip wheel setuptools
pip install yt-dlp==2024.5.27 flask==3.0.3
pip install transformers==4.41.2 #accelerate==0.31.0

Check which version of CUDA you have (Nvidia GPU):

> nvidia-smi
Sat Jun 22 15:35:33 2024       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 555.99                 Driver Version: 555.99         CUDA Version: 12.5     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                  Driver-Model | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3060      WDDM  |   00000000:06:00.0  On |                  N/A |
|  0%   50C    P8             13W /  170W |     984MiB /  12288MiB |      7%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+

However, nvcc --version fails for me and is not recognized. This indicates that the CUDA 12.5 above is not actually accessible.

If you need to swap CUDA versions, follow this guide or the official documentation. The guide seems to assume that you have an alternate version already installed.

I will be installing CUDA 12.1 since it's the latest supported stable version for PyTorch as of June 2024.

Install PyTorch accordingly. For example:

pip3 install torch --index-url https://download.pytorch.org/whl/cu121

YouTube API

Follow the setup here to enable access to YouTube's API: https://developers.google.com/youtube/v3/getting-started

Then install the required client library (we can skip the autorization libraries since we're accessing public information):

pip install --upgrade google-api-python-client

youtube-summarizer's People

Contributors

khasir avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.