Home

Awesome

YouTube Summarizer by TCSenpai

justforfunnoreally.dev badge

YouTube Summarizer is a Streamlit-based web application that allows users to generate summaries of YouTube videos using AI-powered language models and optionally Whisper for transcription.

Screenshot

Features

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/youtube-summarizer.git
    cd youtube-summarizer
    
  2. Install the required dependencies:

    2a. Using pip:

    pip install -r requirements.txt
    

    2b. Using conda:

    conda env create -f environment.yml
    

    Note: You might need to install conda first.

  3. Set up environment variables: Create a .env file in the root directory and add the following:

    YOUTUBE_API_KEY=your_youtube_api_key
    OLLAMA_MODEL=default_model_name
    WHISPER_URL=http://localhost:8000/
    WHISPER_MODEL=Systran/faster-whisper-large-v3
    PASTEBIN_API_KEY=your_pastebin_api_key
    
    • Note: you can copy the env.example file to .env and modify the values.
    • Important: the WHISPER_URL should point to the whisper server you want to use. You can leave it as it is if you are not planning on using Whisper.
    • Important: the PASTEBIN_API_KEY is optional, but if you want to use it, you need to get one from Pastebin.

Usage

  1. Run the Streamlit app:

    streamlit run src/main.py
    
  2. Open your web browser and navigate to the provided local URL (usually http://localhost:8501).

  3. Enter a YouTube video URL in the input field.

  4. (Optional) Customize the Ollama URL and select a different AI model.

  5. (Optional) Customize the Whisper URL and select a different Whisper model.

  6. Click the "Summarize" button to generate a summary of the video.

Global Installation

You can install the application globally on your system by running the following command:

sudo ./install.sh

This will create a new command youlama that you can use to run the application.

Run with the included binary

You can also run the application with the included binary:

./youlama

Dependencies

Project Structure

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

WTFPL License

Credits

Icon: "https://www.flaticon.com/free-icons/subtitles" by Freepik - Flaticon