Show HN: Easy Webpage Summarizer – Quickly Summarize Webpages and YouTube Videos

https://github.com/cobanov/easy-web-summarizer

Easy Webpage Summarizer

A Python script designed to summarize webpages from specified URLs using the LangChain framework and the ChatOllama model. It leverages advanced language models to generate detailed summaries, making it an invaluable tool for quickly understanding the content of web-based documents.

Requirements

ollama must be installed and served

ollama run llama3:instruct
pip install -r requirements.txt

Features

  • Summarization of webpages and youtube videos directly from URLs.
  • Translates to Turkish language (other languages will be added soon!)
  • Integration with LangChain and ChatOllama for state-of-the-art summarization.
  • Command-line interface for easy use and integration into workflows.

Usage

To use the webpage summarizer, run the script from the command line, providing the URL of the document you wish to summarize:

python summarizer.py -u "http://example.com/document"

Replace http://example.com/document with the actual URL of the document you want to summarize.

Web UI

To use the webpage summarizer in you web browser, you can also try gradio app.

gradio

Docker

docker build -t web_summarizer .
docker run -p 7860:7860 web_summarizer
# Run if you run ollama on host
docker run -d --network='host' -p 7860:7860 web_summarizer

Development

To contribute to the development of this script, clone the repository, make your changes, and submit a pull request. We welcome contributions that improve the script's functionality or extend its capabilities.

  • Summarize youtube videos
  • Dockerize project
  • Translate to different languages
  • Streaming text output on gradio
  • Serve on web

License

This script is released under the MIT License. See the LICENSE file in the repository for full details.

{
"by": "cobanov",
"descendants": 0,
"id": 40226459,
"score": 11,
"text": "I&#x27;m excited to share a project. It&#x27;s a Python script that utilizes the LangChain framework and the ChatOllama model to generate concise summaries from webpages and YouTube videos. For those preferring a graphical interface, it includes a Gradio app that runs in the browser to use the summarizer interactively. Easily containerize and deploy the summarizer with Docker.<p>The tool is perfect for anyone needing quick insights without reading through the entire content&#x2F; It&#x27;s open for contributions, so if you&#x27;re interested in improving or extending its functionalities, feel free to dive in!",
"time": 1714584709,
"title": "Show HN: Easy Webpage Summarizer – Quickly Summarize Webpages and YouTube Videos",
"type": "story",
"url": "https://github.com/cobanov/easy-web-summarizer"
}
{
"author": "cobanov",
"date": null,
"description": "Summarize webpages from specified URLs using the LangChain framework and the ChatOllama model - cobanov/easy-web-summarizer",
"image": "https://opengraph.githubassets.com/6ae25950ed228ff68acdcc3ed9ff4feb1a073d687993ce77b3a8e5a223910036/cobanov/easy-web-summarizer",
"logo": "https://logo.clearbit.com/github.com",
"publisher": "GitHub",
"title": "GitHub - cobanov/easy-web-summarizer: Summarize webpages from specified URLs using the LangChain framework and the ChatOllama model",
"url": "https://github.com/cobanov/easy-web-summarizer"
}
{
"url": "https://github.com/cobanov/easy-web-summarizer",
"title": "GitHub - cobanov/easy-web-summarizer: Summarize webpages from specified URLs using the LangChain framework and the ChatOllama model",
"description": "Easy Webpage Summarizer A Python script designed to summarize webpages from specified URLs using the LangChain framework and the ChatOllama model. It leverages advanced language models to generate detailed...",
"links": [
"https://github.com/cobanov/easy-web-summarizer"
],
"image": "https://opengraph.githubassets.com/6ae25950ed228ff68acdcc3ed9ff4feb1a073d687993ce77b3a8e5a223910036/cobanov/easy-web-summarizer",
"content": "<div><article><p></p><h2>Easy Webpage Summarizer</h2><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer#easy-webpage-summarizer\"></a><p></p>\n<p>A Python script designed to summarize webpages from specified URLs using the LangChain framework and the ChatOllama model. It leverages advanced language models to generate detailed summaries, making it an invaluable tool for quickly understanding the content of web-based documents.</p>\n<p></p><h2>Requirements</h2><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer#requirements\"></a><p></p>\n<p><a target=\"_blank\" href=\"https://ollama.com/\">ollama</a> must be installed and served</p>\n<div><pre>ollama run llama3:instruct</pre></div>\n<div><pre>pip install -r requirements.txt</pre></div>\n<p></p><h2>Features</h2><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer#features\"></a><p></p>\n<ul>\n<li>Summarization of webpages and youtube videos directly from URLs.</li>\n<li>Translates to Turkish language (other languages will be added soon!)</li>\n<li>Integration with LangChain and ChatOllama for state-of-the-art summarization.</li>\n<li>Command-line interface for easy use and integration into workflows.</li>\n</ul>\n<p></p><h2>Usage</h2><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer#usage\"></a><p></p>\n<p>To use the webpage summarizer, run the script from the command line, providing the URL of the document you wish to summarize:</p>\n<div><pre>python summarizer.py -u <span><span>\"</span>http://example.com/document<span>\"</span></span></pre></div>\n<p>Replace <code>http://example.com/document</code> with the actual URL of the document you want to summarize.</p>\n<p></p><h3>Web UI</h3><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer#web-ui\"></a><p></p>\n<p>To use the webpage summarizer in you web browser, you can also try gradio app.</p>\n<p><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer/blob/main/assets/gradio.png\"><img src=\"https://github.com/cobanov/easy-web-summarizer/raw/main/assets/gradio.png\" alt=\"gradio\" /></a></p>\n<p></p><h2>Docker</h2><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer#docker\"></a><p></p>\n<div><pre>docker build -t web_summarizer <span>.</span>\ndocker run -p 7860:7860 web_summarizer\n<span><span>#</span> Run if you run ollama on host</span>\ndocker run -d --network=<span><span>'</span>host<span>'</span></span> -p 7860:7860 web_summarizer</pre></div>\n<p></p><h2>Development</h2><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer#development\"></a><p></p>\n<p>To contribute to the development of this script, clone the repository, make your changes, and submit a pull request. We welcome contributions that improve the script's functionality or extend its capabilities.</p>\n<ul>\n<li> Summarize youtube videos</li>\n<li> Dockerize project</li>\n<li> Translate to different languages</li>\n<li> Streaming text output on gradio</li>\n<li> Serve on web</li>\n</ul>\n<p></p><h2>License</h2><a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer#license\"></a><p></p>\n<p>This script is released under the MIT License. See the <a target=\"_blank\" href=\"https://github.com/cobanov/easy-web-summarizer/blob/main/LICENSE\">LICENSE</a> file in the repository for full details.</p>\n</article></div>",
"author": "",
"favicon": "https://github.githubassets.com/favicons/favicon.svg",
"source": "github.com",
"published": "",
"ttr": 49,
"type": "object"
}