Spaces:
Sleeping
Sleeping
File size: 3,469 Bytes
c8af871 df262eb c8af871 df262eb c8af871 df262eb c8af871 e1d1165 c8af871 df262eb c8af871 e1d1165 c8af871 53cf0bf df262eb c8af871 df262eb e1d1165 df262eb e1d1165 df262eb e1d1165 df262eb e1d1165 df262eb e1d1165 df262eb e1d1165 df262eb e1d1165 df262eb c8af871 e1d1165 c8af871 df262eb e1d1165 df262eb e1d1165 |
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 |
---
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...
|