A Streamlit application that extracts wisdom and insights from YouTube videos using AI. The application uses the YouTube Transcript API to fetch video transcripts and processes them through OpenRouter's AI models (specifically google/gemini-2.0-flash-exp:free) to extract key insights and lessons.
- Extract transcripts from YouTube videos
- Process transcripts using AI to extract wisdom and insights
- Clean and user-friendly interface
- Support for various YouTube URL formats
- Comprehensive error handling and logging
- Utilities for file storage and database operations
- Extensive unit tests for reliability
- Docker support for easy deployment
- Python 3.8+
- OpenRouter API key
- Internet connection
- Clone this repository:
git clone https://github.com/yourusername/wisdom-extractor.git
cd wisdom-extractor- Install the required dependencies:
pip install -r requirements.txt- Create a
.envfile in the project root and add your OpenRouter API key:
OPENROUTER_API_KEY=your_openrouter_api_key_here
- Run the application:
streamlit run app.py- Open the application in your web browser (usually at http://localhost:8501)
- Enter a YouTube URL in the input field
- Wait for the transcript to be fetched
- Click "Extract Wisdom" to process the transcript with AI
- View the extracted wisdom and insights
To run the unit tests, use the following command:
pytestThe project includes Docker support for easy deployment. Use the following commands to build and run the application:
- Build the Docker image:
docker build -t wisdom-extractor -f deployment/Dockerfile .- Run the application using Docker Compose:
docker-compose -f deployment/docker-compose.yml up -dapp.py: Main Streamlit applicationconfig/: Configuration filesdata/: Data models and schemaslogging_utils/: Logging utilitiespersistence/: Database and storage utilitiestests/: Unit testsutils/: Utility functions and classesdeployment/: Deployment scripts and configurations
- Python 3.8+
- OpenRouter API key
- Internet connection
Make sure the YouTube video has captions/transcripts available. The application will not work with videos that don't have captions enabled.
This application uses the google/gemini-2.0-flash-exp:free model through OpenRouter. This model is specifically chosen for its ability to extract meaningful insights and wisdom from text content.
This project is licensed under the MIT License.