This platform provides real-time sentiment analysis on stock-related news. It fetches news from over 60 different sources and performs sentiment classification. Additionally, it integrates an AI chatbot that allows users to query the fetched news using a Retrieval-Augmented Generation (RAG) model.
Real-Time Data Fetching:
Sentiment Analysis:
AI Chatbot for News Querying:
Clone the repository:
git clone https://github.com/yourusername/stock-news-sentiment-analysis-platform.git
cd stock-news-sentiment-analysis-platform
Set up a virtual environment (optional but recommended):
python3 -m venv venv
source venv/bin/activate
Install dependencies:
pip install -r requirements.txt
Configure API keys/Model Manifests:
Run the application:
python main.py
The platform scrapes real-time stock news and performs sentiment analysis using finBERT. The classified news is stored in a database for querying and further analysis.
The platform includes a chatbot interface where users can query the news using natural language. The chatbot uses Langchain's RAG model with ChromaDB and the Gemini-1.5-Flash LLM to deliver contextual answers based on the news.
Example queries:
backend/app.py
: Contains Flask backend server.backend/bot.py
: Code for RAG Pipeline.backend/sentiment_analysis.py
: Inference on finBERT text classification model.backend/web_scrape.py
:Contain data fetching pipeline to scrape latest news and save to scraped_news.json.frontend/
:Reactjs library for frontend .Feel free to contribute by opening issues or submitting pull requests!