Skip to content

bPavan16/SummarizeMe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📄 SummarizeMe - AI-Powered Content Summarizer

Streamlit Python LangChain

SummarizeMe is a comprehensive AI-powered content summarization application that transforms YouTube videos, websites, and PDF documents into concise, actionable summaries with audio narration capabilities.

✨ Features

  • 🎥 YouTube Video Summarization: Extract and summarize video transcripts
  • 🌐 Website Content Processing: Summarize articles and web pages
  • 📄 PDF Document Analysis: Process and summarize PDF documents
  • 🎵 Audio Summaries: Generate spoken summaries using text-to-speech
  • 📥 Download Options: Save summaries as text or audio files
  • Fast Processing: Optimized for quick turnaround times
  • 🔒 Secure: Private processing with no data retention

🚀 Quick Start

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/bPavan16/SummarizeMe.git
cd SummarizeMe
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your API keys
  1. Run the application:
streamlit run src/app.py

📁 Project Structure

SummarizeMe-App/
├── src/
│   ├── __init__.py              # Package initialization
│   ├── app.py                   # Main application entry point
│   ├── app_main.py              # Core application logic
│   ├── config.py                # Configuration management
│   ├── exceptions.py            # Custom exceptions
│   ├── logging_config.py        # Logging configuration
│   ├── utils.py                 # Utility functions and classes
│   ├── ytUtils.py               # YouTube processing utilities
│   ├── loaders.py               # Document loaders
│   └── ui_components.py         # UI components and helpers
├── requirements.txt             # Python dependencies
├── .env.example                 # Environment variables template
└── README.md                    # This file

🔧 Configuration

Environment Variables

Create a .env file in the root directory:

# Required
LANGCHAIN_API_KEY=your_langchain_api_key_here
GROQ_API_KEY=your_groq_api_key_here

# Optional
proxy_username=your_proxy_username
proxy_password=your_proxy_password
LLM_MODEL=gemma2-9b-it
MAX_TOKENS=6000
AUDIO_LANGUAGE=en

Streamlit Secrets (for deployment)

For Streamlit Cloud deployment, add these to your secrets.toml:

[secrets]
LANGCHAIN_API_KEY = "your_langchain_api_key_here"
GROQ_API_KEY = "your_groq_api_key_here"

🎯 Usage

YouTube Videos

  1. Select "🎥 YouTube Video" mode
  2. Paste a YouTube video URL
  3. Wait for processing
  4. Download your summary and audio

Websites

  1. Select "🌐 Website URL" mode
  2. Enter a website URL
  3. Get AI-powered content summary
  4. Download in your preferred format

PDF Documents

  1. Select "📄 PDF Document" mode
  2. Upload one or more PDF files
  3. Receive comprehensive summaries
  4. Access audio narration

🏗️ Architecture

The application follows a modular architecture:

  • SummarizeMeApp: Main application orchestrator
  • SummaryGenerator: Handles AI-powered summarization
  • AudioGenerator: Manages text-to-speech conversion
  • DocumentProcessor: Processes and chunks documents
  • YouTubeTranscriptExtractor: Extracts YouTube transcripts
  • WebsiteLoader: Loads website content
  • PDFLoader: Processes PDF documents
  • UIComponents: Reusable UI elements

🔧 Development

Key Improvements in v2.0

  • Modular Architecture: Separated concerns into distinct classes
  • Better Error Handling: Custom exceptions with meaningful messages
  • Improved UI/UX: Enhanced user interface with better feedback
  • Configuration Management: Centralized configuration handling
  • Logging: Comprehensive logging for debugging and monitoring
  • Type Safety: Added type hints throughout the codebase
  • Documentation: Comprehensive docstrings and comments

Running Tests

# Install development dependencies
pip install -r requirements-dev.txt

# Run tests
pytest tests/

🤝 Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support

For support and questions:


Made with ❤️ by the Pavan

⭐ Star us on GitHub if you find this useful!

About

Comprehensive AI-powered content Summarization Application

Topics

Resources

Stars

Watchers

Forks

Languages