boladeE bc485b44b8 Update README and backend functionality for improved news application
- Enhanced README.md with a clearer project overview, features, technologies used, and installation instructions.
- Updated vector dimension in config.py from 4096 to 1024 for Cohere embeddings.
- Modified main.py to serve HTML responses for the home page, news fetching, and recommendations.
- Improved error handling and ensured articles have links in the responses.
- Cleaned up news_fetcher.py by removing unnecessary print statements.
- Updated recommender.py to refine insights generation and summary extraction.
- Added Jinja2 for templating and improved the project structure for better organization.
- Included API documentation for better understanding of endpoints and usage.
2025-04-15 11:59:39 +01:00
2025-04-14 18:24:14 +01:00

DS Task AI News

An AI-powered news application that fetches, processes, and recommends news articles based on your interests.

Overview

DS Task AI News is a web application that uses AI technologies to fetch, analyze, and recommend news articles. The application fetches news from various RSS feeds, processes them using AI, and provides personalized insights and recommendations.

Features

  • Latest News: View the latest news articles fetched from various RSS feeds.
  • News Recommendations: Get personalized news recommendations based on your interests.
  • AI Insights: Receive AI-generated insights about news articles.
  • Article Summaries: Get concise summaries of individual articles.

Technologies Used

  • FastAPI: Web framework for building APIs.
  • Jinja2: Template engine for rendering HTML.
  • Tailwind CSS: Utility-first CSS framework for styling.
  • feedparser: Library for parsing RSS feeds.
  • BeautifulSoup: Library for parsing HTML.
  • Cohere: API for generating embeddings.
  • Pinecone: Vector database for storing and retrieving embeddings.
  • Groq: API for generating insights and summaries.

Getting Started

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Internet connection

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/ds_task_ai_news.git
    cd ds_task_ai_news
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Set up the required environment variables:

    • Create a .env file in the root directory with the following content:
      GROQ_API_KEY=your_groq_api_key
      PINECONE_API_KEY=your_pinecone_api_key
      PINECONE_ENVIRONMENT=your_pinecone_environment
      PINECONE_INDEX=your_pinecone_index
      
  4. Run the application:

    python backend/main.py
    
  5. Open your web browser and navigate to http://localhost:8000.

Documentation

Project Structure

ds_task_ai_news/
├── backend/
│   ├── main.py
│   ├── news_fetcher.py
│   ├── embeddings.py
│   ├── vector_store.py
│   ├── recommender.py
│   ├── config.py
│   └── templates/
│       ├── base.html
│       ├── home.html
│       ├── news.html
│       └── recommendations.html
├── data/
│   ├── raw_news/
│   └── processed_news/
├── docs/
│   ├── API_Documentation.md
│   ├── Technical_Documentation.md
│   └── User_Guide.md
└── requirements.txt

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

S
Description
First Data Science project
Readme 2 MiB
Languages
Python 64.5%
HTML 35.5%