JC321's picture
Upload 3 files
df262eb verified
---
title: Financial & Market AI Assistant
emoji: πŸ“Š
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 6.0.1
app_file: app.py
pinned: false
license: mit
---
# Financial & Market AI Assistant
A streamlined Gradio-based AI assistant that integrates **SEC financial data** and **real-time market information** through two MCP servers.
## ✨ Features
- πŸ€– **Intelligent AI Assistant**: Powered by **Qwen/Qwen2.5-72B-Instruct:novita** (supports tool calling)
- πŸ“Š **Dual Data Sources**:
- **SEC Financial Reports**: Official 10-K/10-Q data (revenue, earnings, cash flow, etc.)
- **Market & Stock Data**: Real-time stock quotes and news (powered by Finnhub)
- πŸ› οΈ **Automatic MCP Tool Calling**: AI automatically uses 6 tools across 2 MCP servers
- πŸ’¬ **Natural Language Interface**: Just ask questions naturally
- πŸ” **Smart Analysis**: AI provides data-driven insights, not just raw data
## πŸš€ Quick Start
### Prerequisites
- Python 3.9+
- Hugging Face API token (get one at https://huggingface.co/settings/tokens)
### Installation
1. Clone the repository
2. Install dependencies: `pip install -r requirements.txt`
3. Create a `.env` file with your HF token:
```
HF_TOKEN=your_token_here
```
4. Run: `python app.py`
### Usage
Just start asking questions! The AI will automatically fetch data from the right source:
**Financial Questions:**
- "What's Apple's latest revenue and profit?"
- "Show me NVIDIA's 3-year financial trends"
- "Compare Microsoft's latest earnings with its operating expenses"
**Market Questions:**
- "How is Tesla's stock performing today?"
- "Get the latest market news about crypto"
- "What's the current price of AAPL?"
**Combined Analysis:**
- "Compare Microsoft's latest earnings with its current stock price"
- "Show me Amazon's financial performance and recent news"
## πŸ› οΈ Available MCP Tools
**SEC Financial Reports MCP:**
1. `advanced_search_company` - Find US companies by name/ticker
2. `get_latest_financial_data` - Get latest 10-K/10-Q data
3. `extract_financial_metrics` - Get 3-year or 5-year trends
**Market & Stock Data MCP (Finnhub):**
4. `get_quote` - Real-time stock price, volume, change
5. `get_market_news` - Latest market news (general/forex/crypto/merger)
6. `get_company_news` - Company-specific news with date range
## πŸ’Ύ Data Sources
- **SEC Financial Data**: https://huggingface.co/spaces/JC321/EasyReportDateMCP
- **Market & Stock Data**: https://huggingface.co/spaces/JC321/MarketandStockMCP (Finnhub API)
## πŸ› οΈ Technology Stack
- **Frontend**: Gradio 6.0.1 (ChatInterface)
- **AI Model**: Qwen/Qwen2.5-72B-Instruct:novita (Hugging Face Inference API)
- **MCP Protocol**: 2 MCP Servers (HTTP + SSE transports)
- **Data Sources**:
- SEC EDGAR (official financial filings)
- Finnhub API (real-time market data)
## πŸ’‘ Tips
- Ask about **financials** (revenue, profit) or **market data** (stock price, news)
- AI understands context and can combine data from both sources
- Both company names and ticker symbols work ("Apple" or "AAPL")
- The AI shows which tools it used for transparency
## πŸ‘ Supported Companies
All US-listed companies in SEC EDGAR database, including:
- Tech: Apple, Microsoft, NVIDIA, Google, Meta, Amazon, Tesla
- Finance: JPMorgan, Bank of America, Goldman Sachs
- Retail: Walmart, Target, Costco
- And many more...