Giter Site home page Giter Site logo

quantlight / ai-powered-news-summarizer Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 633 KB

The main goal of an AI-Powered News Summarizer is to assist users in quickly understanding the main points and essential information from a large volume of news articles or textual content. By automatically summarizing news articles, it saves time and effort by providing users with a brief overview without having to read the entire article.

License: MIT License

JavaScript 9.29% CSS 15.98% Python 44.90% HTML 29.83%
ai-summarizer artifi gui-application news newsfeed newsscraper newssummary webapp article-extractor python

ai-powered-news-summarizer's Introduction

Screenshots

Light Mode

Light Mode

Dark Mode

Dark Mode

Note

Get your free Trial API key from https://cohere.com/ and put it in the file summarizer.py. This trial key is rate limited at 100 calls / minute as per their Official FAQs.

This repository contains a Python Flask web application for fetching and summarizing news articles from RSS feeds.

Table of Contents:

Features

  1. RSS Feed Parsing: It fetches news articles from RSS feeds using the feedparser library.

  2. Article Content Extraction: It extracts the full content of each article from the web pages using the requests library.

  3. Text Summarization: It summarizes the extracted article content using the Cohere API.

  4. Database Storage: It stores the article details, including the title, author, publication date, link, full content, and summarized content, in a SQLite database.

  5. Web Interface: It offers a web interface using Flask, allowing users to view and interact with the collected news articles. It offers Light and Dark Themes and Custom Themes.

Getting Started

To run this application locally, follow these steps:

Clone this repository to your local machine or download the zip file and extract it to your preferred location.

git clone https://github.com/Quantlight/AI-Powered-News-Summarizer

Install the required Python libraries by running:

pip install -r requirements.txt

Create .env file in root directory of your project folder and add this

API-KEY=YOUR-API-KEY

Obtain a Cohere API key and replace "YOUR-API-KEY" in the code with your actual API key.

Prepare an OPML file (e.g., "news_links.opml") with the RSS feed URLs you want to fetch articles from. Run the Flask application:

python summarizer.py

The application should now be accessible locally in your web browser.

Usage

Start the application as described in the "Getting Started" section.

Access the web interface by navigating to http://localhost:5000/ or http://127.0.0.1:5000 in your web browser.

The application will fetch articles from the RSS feeds specified in the "news_links.opml" file and display them on the web page.

Enjoy your News Summaries.

Dependencies

The project uses the following Python libraries and APIs:

  • feedparser for parsing RSS feeds.

  • requests for making HTTP requests to fetch article content.

  • cohere for text summarization.

  • sqlite3 for database management.

  • beautifulsoup4 for parsing HTML content.

  • markdown2 for rendering Markdown content.

  • Flask for the web application.

Make sure to install these dependencies as mentioned in the "Getting Started" section.

Contributing

If you'd like to contribute to this project, please fork the repository and create a pull request. We welcome improvements, bug fixes, and feature additions.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

ai-powered-news-summarizer's People

Contributors

quantlight avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

visioninhope

ai-powered-news-summarizer's Issues

Categorize the articles

Categorizing the articles using cohere's classify function.
The categories should be.

  • Business
  • Entertainment
  • Family
  • Health
  • Politics
  • Religion
  • Science
  • Sports
  • Technology
  • Travel
  • Vehicles
  • Video
  • World

Use of Actual Summarization Model

Fixed the Issue where Model Generates Summaries in Random Format and add other things like "What would you like me to do next?". The use of Actual summarization model from cohere fixed that when updating cohere module to latest version at the time of writing this.

Added Error Handling

Added Error Handling when there is any error it retries for 7 maximum times and moves on to next link. Usually where the API calls / minute is Limited to 5.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.