Skip to content

Bugaddr/summora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Summora: Local AI-Powered Webpage & YouTube Video Summarizer

Python 3.9+ MIT License Ollama Required

A privacy-first summarization tool that generates dynamic bullet-point summaries from webpages and YouTube videos using local AI processing. No cloud dependencies, no data leaks!


✨ Features

  • Dynamic Summarization Levels (1-5) - From concise overviews to detailed breakdowns
  • Dual Content Support - Webpages & YouTube videos
  • Local AI Processing - Powered by Ollama (Gemma:3B)
  • Self-Hosted - Full control over your data

🛠️ Installation

Prerequisites

  • Python 3.9+
  • Ollama installed with CUDA
  • 8GB+ RAM recommended
# 1. Start Ollama service
OLLAMA_DEBUG=4 ollama serve

# 2. Install AI model (choose one)
ollama pull gemma3  # Lightweight option

# 3. Clone repository
git clone https://github.com/bugaddr/summora.git
cd summora

# 4. Install dependencies
pip install -r requirements.txt

🚀 Usage

Start API Server

uvicorn main:app --reload --host 0.0.0.0 --port 8000

Example Requests

cURL:

curl -X POST "http://localhost:8000/summarize" \
-H "Content-Type: application/json" \
-d '{
  "url": "https://youtu.be/dQw4w9WgXcQ",
  "level": 3
}'

Python Client:

import requests

response = requests.post(
    "http://localhost:8000/summarize",
    json={
        "url": "https://example.com/article",
        "level": 4  # 1=concise, 5=detailed
    }
)
print(response.json()["summary"])

📚 API Documentation

POST /summarize

Request Body:

{
  "url": "string (required)",
  "level": "integer (1-5)"
}

Success Response:

{
  "summary": "• Point 1\n• Point 2\n• Point 3"
}

Error Responses:

Code Description
400 Invalid URL format
422 Content extraction failed
429 Rate limit exceeded
500 Internal server error

👨‍💻 Development

Tech Stack

Component Technology
Backend Python + FastAPI
AI Engine Ollama + Gemma3
Web Scraping BeautifulSoup4 + readability-lxml
YouTube Processing youtube-transcript-api
Frontend React + Tailwind CSS
Browser Extension WebExtensions API

Architecture

flowchart TD
    A[USER] -->|Request| B[FastAPI Server]
    B --> C[Text Extraction Module]
    C --> D[YouTube Transcript]
    C --> E[Webpage Scraper]
    D --> F[Ollama Server]
    E --> F
    F --> G[Bullet points Summary JSON]
    G -->|Response| A
Loading

File Structure

summora/
├── main.py            # FastAPI server
├── web_ui/            # React frontend
├── requirements.txt
└── docs/
    └── architecture.png

Contributing

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

📄 License

MIT License - See LICENSE for details

🙏 Acknowledgments


Privacy First: All processing happens locally - no data is collected, stored, or transmitted to external services. Your browsing remains private!

About

Multi level AI based webpage/video summarization tool

Resources

License

Stars

Watchers

Forks