Sign inSign up

aghasuhail96/news-summarizer-and-sentiment-analyzer

By aghasuhail96

Updated about 1 year ago

Streamlit app using LangGraph & OpenAI to fetch news, summarize, analyze sentiment, & report.

Image
Languages & frameworks
API management
Developer tools
0

1.4K

aghasuhail96/news-summarizer-and-sentiment-analyzer repository overview

News Summarizer and Sentiment Analyzer

Description

A Streamlit-based web app that fetches news articles for a user-specified topic, summarizes them, analyzes sentiment, retries up to three times if sentiment is negative, and generates a concise report with up to 8 URLs. Built with LangGraph, LangChain, OpenAI, and NewsAPI.

Features

  • Web interface to input topics and view reports.
  • Fetches news via NewsAPI.
  • Summarizes articles using OpenAI.
  • Analyzes sentiment and retries for positive/mixed sentiment.
  • Generates reports with summaries and URLs.

Prerequisites

Quick Start

  1. Pull the Image:

    docker pull aghasuhail96/news-summarizer-and-sentiment-analyzer
    
  2. Run the Container:

    docker run -e NEWSAPI_KEY=your_key -e GOOGLE_API_KEY=your_gemini_api_key -e OPENAI_API_KEY=your_openai_key -p 8501:8501 -it aghasuhail96/news-summarizer-and-sentiment-analyzer
    

    Access at http://localhost:8501. No .env file needed; pass variables directly.

  3. Clone the Repository:

    git clone https://github.com/soh-kaz/News-Summarize.git
    cd your-repo-name
    

Example Output

Topic: cricket
Total Retry Count: 1 out of 3
Sentiment: positive
Concise Report:
Cricket, a sport played between two teams of 11 players...
- https://www.bbc.co.uk/iplayer/episode/m002gbtf/womens-odi-cricket-2025-highlights-england-v-india-second-odi
- https://www.bbc.com/sport/cricket/articles/cwyrx6wkez5o
...

Screenshot

Workflow

Support

Visit GitHub repository for issues.

License

MIT License

Tag summary

Content type

Image

Digest

sha256:3c1bf9ab2

Size

251.2 MB

Last updated

about 1 year ago

docker pull aghasuhail96/news-summarizer-and-sentiment-analyzer