YouTube Summarizer is a Streamlit-based web application that allows users to generate summaries of YouTube videos using AI-powered language models.
- Fetch and cache YouTube video transcripts
- Summarize video content using Ollama AI models
- Display video information (title and channel)
- Customizable Ollama URL and model selection
-
Clone the repository:
git clone https://github.com/yourusername/youtube-summarizer.git cd youtube-summarizer
-
Install the required dependencies:
pip install -r requirements.txt
-
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
-
Run the Streamlit app:
streamlit run src/main.py
-
Open your web browser and navigate to the provided local URL (usually
http://localhost:8501
). -
Enter a YouTube video URL in the input field.
-
(Optional) Customize the Ollama URL and select a different AI model.
-
Click the "Summarize" button to generate a summary of the video.
- Streamlit
- Pytube
- Ollama
- YouTube Data API
- Python-dotenv
src/main.py
: Main Streamlit applicationsrc/ollama_client.py
: Ollama API client for model interactionsrc/video_info.py
: YouTube API integration for video informationtranscript_cache/
: Directory for caching video transcripts
Contributions are welcome! Please feel free to submit a Pull Request.
WTFPL License
Icon: "https://www.flaticon.com/free-icons/subtitles" by Freepik - Flaticon