Spaces:
Runtime error
Runtime error
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,3 +10,82 @@ pinned: false
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
+
|
| 14 |
+
# π Multi-Agent Finance Assistant
|
| 15 |
+
|
| 16 |
+
A sophisticated AI-powered financial analysis system that delivers spoken market briefs through an intuitive Gradio interface. Built with multiple specialized agents and powered by Google's Gemini 2.0 Flash.
|
| 17 |
+
|
| 18 |
+
## ποΈ Architecture Overview
|
| 19 |
+
|
| 20 |
+
### Agent Ecosystem
|
| 21 |
+
```
|
| 22 |
+
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
|
| 23 |
+
β API Agent β β Scraping Agent β β Retriever Agent β
|
| 24 |
+
β Real-time Data β β News & Filings β β Vector Search β
|
| 25 |
+
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
|
| 26 |
+
β β β
|
| 27 |
+
βββββββββββββββββββββββββΌββββββββββββββββββββββββ
|
| 28 |
+
β
|
| 29 |
+
βββββββββββββββββββ
|
| 30 |
+
β Orchestrator β
|
| 31 |
+
β (FastAPI) β
|
| 32 |
+
βββββββββββββββββββ
|
| 33 |
+
β
|
| 34 |
+
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
|
| 35 |
+
β Analysis Agent β β Language Agent β β Voice Agent β
|
| 36 |
+
β Risk Metrics β β Gemini 2.0 Flashβ β STT/TTS Pipelineβ
|
| 37 |
+
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
## π― Key Features
|
| 41 |
+
|
| 42 |
+
- **π€ Multi-Agent Architecture**: Six specialized agents working in harmony
|
| 43 |
+
- **π€ Voice Interface**: Speech-to-text and text-to-speech capabilities
|
| 44 |
+
- **π Real-time Data**: Live market data via Yahoo Finance API
|
| 45 |
+
- **π Smart Retrieval**: Vector search with FAISS embeddings
|
| 46 |
+
- **π§ Advanced AI**: Powered by Google Gemini 2.0 Flash
|
| 47 |
+
- **π± Modern UI**: Attractive Gradio interface with dark mode support
|
| 48 |
+
- **βοΈ Cloud Ready**: Deployable on Hugging Face Spaces
|
| 49 |
+
|
| 50 |
+
## π Quick Start
|
| 51 |
+
|
| 52 |
+
### Local Development
|
| 53 |
+
|
| 54 |
+
1. **Clone the repository**
|
| 55 |
+
```bash
|
| 56 |
+
git clone <your-repo-url>
|
| 57 |
+
cd multi-agent-finance-assistant
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
2. **Install dependencies**
|
| 61 |
+
```bash
|
| 62 |
+
pip install -r requirements.txt
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
3. **Set environment variables**
|
| 66 |
+
```bash
|
| 67 |
+
export GEMINI_API_KEY="your-gemini-api-key"
|
| 68 |
+
export ALPHA_VANTAGE_KEY="your-alphavantage-key" # Optional
|
| 69 |
+
```
|
| 70 |
+
|
| 71 |
+
4. **Run the application**
|
| 72 |
+
```bash
|
| 73 |
+
python app.py
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
### Hugging Face Spaces Deployment
|
| 77 |
+
|
| 78 |
+
1. **Create a new Space** on Hugging Face
|
| 79 |
+
2. **Upload all files** to your Space repository
|
| 80 |
+
3. **Add secrets** in Space settings:
|
| 81 |
+
- `GEMINI_API_KEY`: Your Google AI Studio API key
|
| 82 |
+
4. **Set Space to Gradio** framework
|
| 83 |
+
5. **Deploy** and share!
|
| 84 |
+
|
| 85 |
+
## π Use Case Example
|
| 86 |
+
|
| 87 |
+
**Morning Market Brief Query:**
|
| 88 |
+
> "What's our risk exposure in Asia tech stocks today, and highlight any earnings surprises?"
|
| 89 |
+
|
| 90 |
+
**AI Response:**
|
| 91 |
+
> "Today, your Asia tech allocation is 22% of AUM, up from 18% yesterday. TSMC beat estimates by 4%, Samsung missed by 2%. Regional sentiment is neutral with a cautionary tilt due to rising yields
|