File size: 10,750 Bytes
f29b750 c7aace8 527a3fc f29b750 95ee8cc f29b750 c9f4164 527a3fc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
---
title: Global Business News Intelligence
emoji: π
colorFrom: blue
colorTo: yellow
sdk: streamlit
app_file: app.py
pinned: false
sdk_version: 1.48.0
---
π Global Business News Intelligence Dashboard
Advanced AI-powered news analysis platform with multilingual support, sentiment analysis, and comprehensive reporting
π Table of Contents
Overview
Key Features
Business Use Cases
Architecture
Quick Start
API Documentation
Technical Stack
Sample Outputs
Deployment
π Overview
The Global Business News Intelligence Dashboard is a comprehensive AI-powered platform that aggregates, analyzes, and synthesizes business news from multiple sources. Built with modern ML/NLP techniques, it provides real-time sentiment analysis, multilingual summaries, and professional reporting capabilities.
Perfect for: Investment research, brand monitoring, market intelligence, media analysis, and competitive intelligence.
π― Key Features
π Advanced News Aggregation
Multi-source scraping from RSS feeds (Google News, Reuters, Bloomberg, etc.)
Intelligent deduplication and relevance filtering
Real-time processing of 5-50 articles per query
Language detection and English content filtering
π― Multi-Model Sentiment Analysis
VADER - General sentiment analysis
Loughran-McDonald - Financial sentiment dictionary
FinBERT - Domain-specific financial sentiment
Hybrid scoring with weighted model combination
π Multilingual Support
Text summarization with transformer models
Translation to Hindi and Tamil
Audio generation with text-to-speech in 3 languages
Cultural context preservation in translations
π Interactive Dashboard
Real-time visualizations with Plotly
Sentiment distribution charts and timelines
Keyword clouds and topic analysis
Source coverage analysis and metrics
π€ Professional Reporting
PDF reports with charts and analysis
CSV/JSON exports for data analysis
Executive summaries with key insights
Professional formatting ready for stakeholders
π RESTful API
Programmatic access to all features
Batch processing capabilities
JSON responses with comprehensive data
Rate limiting and error handling
π’ Business Use Cases
π Investment Research
Track sentiment around stocks and companies
Monitor earnings coverage and market reactions
Analyze competitor mentions and market positioning
Generate investment thesis supporting materials
π’ Brand Monitoring
Monitor public perception across news sources
Track crisis communications and reputation
Analyze competitor brand coverage
Generate brand health reports
π Market Intelligence
Stay informed about industry trends
Monitor regulatory and policy changes
Track emerging technologies and disruptions
Analyze market sentiment shifts
π° Media Analysis
Analyze coverage patterns across sources
Identify media bias and perspective differences
Track story lifecycle and narrative changes
Generate media landscape reports
ποΈ Architecture
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β Streamlit UI β β FastAPI Core β β Data Layer β
β β β β β β
β β’ Dashboard βββββΊβ β’ News Analyzer βββββΊβ β’ RSS Feeds β
β β’ Controls β β β’ API Endpoints β β β’ Web Scraping β
β β’ Visualizationsβ β β’ Process Orchestrβ β β’ Cache Storage β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
βββββββββββββββββΌββββββββββββββββ
β β β
βββββββββββββββββββ ββββββββββββββββ βββββββββββββββββββ
β NLP Processing β β ML Pipeline β β Output Generationβ
β β β β β β
β β’ Text Cleaning β β β’ Sentiment β β β’ Summarization β
β β’ Language Det. β β β’ Keywords β β β’ Translation β
β β’ Content Extr. β β β’ Entity Extrβ β β’ Audio/Reports β
βββββββββββββββββββ ββββββββββββββββ βββββββββββββββββββ
Core Components
app.py - Streamlit frontend with interactive dashboard
api.py - FastAPI backend with analysis orchestration
scraper.py - Multi-source news aggregation with deduplication
nlp.py - Sentiment analysis and keyword extraction
summarizer.py - Text summarization with chunking
translator.py - Multilingual translation pipeline
tts.py - Text-to-speech audio generation
report.py - Professional PDF/CSV/JSON report generation
utils.py - Caching, logging, and utility functions
β‘ Quick Start
1. Clone & Setup
bashgit clone https://github.com/your-repo/news-intelligence-dashboard
cd news-intelligence-dashboard
pip install -r requirements.txt
2. Run Application
bash# Launch Streamlit Dashboard
streamlit run app.py
# Or run FastAPI server
python -m uvicorn api:app --host 0.0.0.0 --port 8000
3. Access Dashboard
Streamlit UI: http://localhost:8501
API Docs: http://localhost:8000/docs
Health Check: http://localhost:8000/health
4. Basic Usage
Enter a company name, stock ticker, or keyword
Configure analysis settings (articles, languages, models)
Click "Analyze News" and wait for processing
Explore results in interactive dashboard
Export findings as PDF, CSV, or JSON
π API Documentation
Core Endpoint
httpGET /api/analyze?query=Tesla&num_articles=20&languages=English,Hindi
Request Parameters
ParameterTypeDefaultDescriptionquerystringrequiredCompany/keyword to analyzenum_articlesinteger20Number of articles (5-50)languagesarray["English"]Summary languagesinclude_audiobooleantrueGenerate audio summariessentiment_modelsarray["VADER","LM","FinBERT"]Models to use
Sample Response
json{
"query": "Tesla",
"total_articles": 20,
"processing_time": 45.67,
"average_sentiment": 0.234,
"sentiment_distribution": {
"Positive": 12,
"Negative": 3,
"Neutral": 5
},
"articles": [...],
"keywords": [...],
"audio_files": {...}
}
Additional Endpoints
GET /api/sources - Available news sources
GET /api/models - Available ML models
GET /api/keywords/{query} - Extract keywords only
GET /health - System health check
π οΈ Technical Stack
Backend
FastAPI - High-performance API framework
Streamlit - Interactive web interface
Python 3.8+ - Core runtime environment
Machine Learning
Transformers - BERT, DistilBART, and T5 models
PyTorch - Deep learning framework
NLTK - Natural language processing
VADER - Lexicon-based sentiment analysis
Data Processing
Pandas/NumPy - Data manipulation
BeautifulSoup - HTML parsing
Trafilatura - Content extraction
Feedparser - RSS feed processing
Visualization
Plotly - Interactive charts
Matplotlib - Static visualizations
WordCloud - Keyword visualization
Output Generation
ReportLab - PDF generation
gTTS - Text-to-speech
Helsinki-NLP - Translation models
π Sample Outputs
Dashboard Screenshots
Main Dashboard
Show Image
Interactive sentiment analysis dashboard with real-time charts
Sentiment Analysis
Show Image
Multi-model sentiment scoring with detailed breakdowns
Article Analysis
Show Image
Individual article analysis with summaries and scores
Sample PDF Report
Show Image
Professional PDF report with executive summary and visualizations
Sample API Response
json{
"query": "Apple Inc",
"total_articles": 25,
"processing_time": 52.3,
"average_sentiment": 0.156,
"sentiment_distribution": {
"Positive": 15,
"Negative": 4,
"Neutral": 6
},
"top_keywords": [
{"keyword": "iPhone sales", "score": 0.89},
{"keyword": "quarterly earnings", "score": 0.76},
{"keyword": "market share", "score": 0.68}
],
"summary": "Predominantly positive coverage focusing on strong iPhone sales and quarterly performance..."
}
π Deployment
Hugging Face Spaces (Recommended)
Fork this repository
Create new Space on Hugging Face
Upload all files to your Space
Space will auto-deploy with Streamlit
Docker Deployment
dockerfileFROM python:3.8-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8501
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0"]
Local Development
bash# Install dependencies
pip install -r requirements.txt
# Set environment variables
export STREAMLIT_SERVER_HEADLESS=true
export STREAMLIT_SERVER_PORT=8501
# Run application
streamlit run app.py
Environment Variables
bash# Optional configuration
STREAMLIT_SERVER_HEADLESS=true
STREAMLIT_SERVER_PORT=8501
FASTAPI_HOST=0.0.0.0
FASTAPI_PORT=8000
CACHE_TTL_HOURS=6
MAX_ARTICLES=50
DEBUG_MODE=false
π Performance Metrics
Processing Speed: 20-50 articles in 30-60 seconds
Memory Usage: ~2GB RAM for full pipeline
API Response Time: <5 seconds for typical queries
Accuracy: >85% sentiment classification accuracy
Language Support: English, Hindi, Tamil
Concurrent Users: Supports 10+ simultaneous sessions
π€ Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
bash# Clone repository
git clone https://github.com/your-repo/news-intelligence-dashboard
cd news-intelligence-dashboard
# Create virtual environment
python -m venv venv
source venv/bin/activate # Linux/Mac
# or venv\Scripts\activate # Windows
# Install development dependencies
pip install -r requirements.txt
pip install -r requirements-dev.txt
# Run tests
python -m pytest tests/
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
Hugging Face - Transformer models and hosting
Streamlit - Interactive web framework
FastAPI - High-performance API framework
NLTK/VADER - Sentiment analysis tools
ReportLab - PDF generation capabilities
π Support
Documentation: Project Wiki
Issues: GitHub Issues
Discussions: GitHub Discussions
Email: [email protected]
π‘ Ready to Deploy?
This project is 100% ready for Hugging Face Spaces deployment. Simply upload all files to your Space and it will automatically deploy with zero configuration required.
π Deploy to Hugging Face Spaces
Built with β€οΈ for the AI and finance community
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference |