text-summarizer / README.md
BonusLockSMith's picture
Deploy text summarizer (30-in-15 #2)
c5d0aa5 verified
|
Raw History Blame Contribute Delete
1.71 kB
metadata
title: Text Summarizer
emoji: πŸ“
colorFrom: indigo
colorTo: blue
sdk: docker
app_port: 7860
pinned: false

Text Summarizer πŸ“

Paste an article, email, or notes β€” or drop in a URL β€” and get a faithful TL;DR plus key points, streamed live. Pick the depth: Brief, Standard, or Detailed.

Project #2 of my "30 AI Projects in 15 Days" build-in-public challenge.

demo

What it does

  • Summarize text or a link β€” paste raw text, or give it a URL and it fetches + extracts the article for you.
  • Three depths β€” a 2–3 sentence TL;DR, a paragraph + key bullets, or a detailed breakdown that preserves names/numbers/dates.
  • Faithful β€” instructed to never add facts or opinions not in the source.
  • Live streaming output with a one-click Copy.

What it demonstrates

  • Prompt engineering β€” length/format control via a parameterized system prompt.
  • Retrieval from the web β€” server-side fetch + HTMLβ†’text extraction (BeautifulSoup).
  • Streaming UX (Server-Sent Events) and a clean, responsive single-file UI.
  • Backend-agnostic β€” Claude API in the cloud, or a local Ollama model. Same code.

Run locally

pip install -r requirements.txt
export ANTHROPIC_API_KEY=sk-ant-...      # or set OLLAMA_URL / OLLAMA_MODEL
python app.py                            # http://127.0.0.1:8500

Deploy (always-on)

Ships with a Dockerfile β€” works on Hugging Face Spaces, Render, Railway, or Fly.io. Set ANTHROPIC_API_KEY (+ optional ANTHROPIC_MODEL=claude-haiku-4-5) as a secret.


Built by Robert Lucyk Β· GritAI Solutions Β· part of the 30-in-15 challenge.