How 14abhishek/newssummarize works
Project Type & Purpose
• Type: A single-page real-time analytics dashboard (full-stack-style, but served entirely by Streamlit).
• Purpose: Fetch news from NewsAPI, run NLP (sentiment + topic modeling), and render interactive visualizations.
File Structure
• Top-level scripts:
• app.py – Streamlit UI and orchestrator
• news_fetcher.py – handles external API calls
• sentiment_analyzer.py – NLP component for sentiment
• topic_modeler.py – NLP component for topics
• data_visualizer.py – creates Plotly/Matplotlib/WordCloud outputs
• utils.py – shared data-prep helpers
• No persistent database—data is held in memory/Streamlit session.
• External config: .streamlit/config.toml for deployment, pyproject.toml for dependencies.
Extract Key Architecture Insights from README
• Frontend: Streamlit (Python)
• Data Processing: Pandas, NumPy
• NLP: NLTK, Scikit-learn
• Visualization: Plotly, Matplotlib, WordCloud
• External Service: NewsAPI
• Auto-update scheduler built into Streamlit sidebar settings
Main Components & Interactions
a. User (Web Browser) & Streamlit UI
• Triggers data-refresh and filter changes
b. NewsFetcher Module
• Calls NewsAPI → JSON articles
c. Processing Pipeline
1. utils.py cleans & structures raw JSON → DataFrame
2. sentiment_analyzer.py tags each article
3. topic_modeler.py assigns topic labels
d. DataVisualizer Module
• Consumes annotated DataFrame → renders charts & word clouds
e. Environment & Config
• NEWS_API_KEY, refresh interval, filter settings
f. External Service
• NewsAPI (REST calls over HTTPS)
Architectural Patterns & Principles
• Modular pipeline (each .py file is one stage)
• Single-page UI orchestration (app.py as controller)
• In-memory data flow (no external DB)
• Extensibility: utils.py for shared logic, easy to plug in new analysis steps