Abid Ali Awan
commited on
Commit
Β·
0d09fe2
1
Parent(s):
811d9d0
Update README.md: Revise demo video link, enhance installation instructions, and streamline feature descriptions. Remove outdated example prompts and clarify backend technology version.
Browse files
README.md
CHANGED
@@ -21,17 +21,16 @@ short_description: Financial analysis, investments, budget planning, and more.
|
|
21 |
|
22 |
An intelligent financial advisory agent powered by OpenAI's GPT-4.1 and specialized financial tools. This agent provides comprehensive financial analysis, investment recommendations, budget planning, and market insights through an intuitive web interface.
|
23 |
|
24 |
-
|
25 |
|
26 |
|
27 |
-
[](https://youtu.be/
|
28 |
|
29 |
## π Features
|
30 |
|
31 |
### Core Financial Tools
|
32 |
- **π Investment Analyzer**: Real-time stock analysis with technical indicators, risk assessment, and investment recommendations
|
33 |
- **π° Budget Planner**: Personalized budget creation using the 50/30/20 rule with optimization suggestions
|
34 |
-
- **π³ Expense Tracker**: Advanced expense analysis with trends, predictions, and anomaly detection
|
35 |
- **π Portfolio Analyzer**: Portfolio diversification analysis and performance optimization
|
36 |
- **π° Market Trends Analyzer**: Real-time market news, sector analysis, and economic insights
|
37 |
|
@@ -39,15 +38,14 @@ An intelligent financial advisory agent powered by OpenAI's GPT-4.1 and speciali
|
|
39 |
- **π― Smart Response Type Detection**: Automatically detects if users want short summaries or detailed reports
|
40 |
- **β‘ Real-time LLM Streaming**: Live token-by-token response generation from OpenAI API
|
41 |
- **π Interactive Tool Results**: Collapsible sections for clean data presentation
|
42 |
-
- **π Comprehensive Data Analysis**: Enhanced
|
43 |
-
- **β±οΈ Real-time Status Updates**: Shows which APIs are being called and estimated completion times
|
44 |
|
45 |
## π οΈ Installation
|
46 |
|
47 |
1. **Clone the repository**
|
48 |
```bash
|
49 |
-
git clone https://
|
50 |
-
cd
|
51 |
```
|
52 |
|
53 |
2. **Install dependencies**
|
@@ -56,7 +54,7 @@ pip install -r requirements.txt
|
|
56 |
```
|
57 |
|
58 |
3. **Set up environment variables**
|
59 |
-
|
60 |
```bash
|
61 |
export OPENAI_API_KEY="your-openai-api-key"
|
62 |
export TAVILY_API_KEY="your-tavily-api-key"
|
@@ -67,75 +65,6 @@ export TAVILY_API_KEY="your-tavily-api-key"
|
|
67 |
python app.py
|
68 |
```
|
69 |
|
70 |
-
## π¬ Example Prompts
|
71 |
-
|
72 |
-
### Single Tool Invocation
|
73 |
-
|
74 |
-
#### Investment Analyzer
|
75 |
-
```
|
76 |
-
"Analyze AAPL stock and tell me if it's a good investment"
|
77 |
-
"Should I buy Tesla stock right now?"
|
78 |
-
"Give me a detailed analysis of Microsoft shares"
|
79 |
-
"Quick summary of NVDA stock performance"
|
80 |
-
```
|
81 |
-
|
82 |
-
#### Budget Planner
|
83 |
-
```
|
84 |
-
"Help me create a budget with $5000 monthly income and expenses: rent $1500, food $500, utilities $200"
|
85 |
-
"I make $75,000 annually, help me budget my expenses"
|
86 |
-
"Create a budget plan for someone earning $4000/month"
|
87 |
-
"Quick budget advice for $6000 monthly income"
|
88 |
-
```
|
89 |
-
|
90 |
-
#### Market Trends Analyzer
|
91 |
-
```
|
92 |
-
"What are the latest market trends in tech stocks?"
|
93 |
-
"Give me current market news and analysis"
|
94 |
-
"Detailed report on today's market movements"
|
95 |
-
"Quick market update for technology sector"
|
96 |
-
```
|
97 |
-
|
98 |
-
#### Portfolio Analyzer
|
99 |
-
```
|
100 |
-
"Analyze my portfolio: {'holdings': [{'symbol': 'AAPL', 'shares': 100}, {'symbol': 'GOOGL', 'shares': 50}]}"
|
101 |
-
"Check my diversification with holdings: AAPL 40%, MSFT 30%, TSLA 30%"
|
102 |
-
"Detailed portfolio analysis for my current investments"
|
103 |
-
```
|
104 |
-
|
105 |
-
### Response Type Control
|
106 |
-
|
107 |
-
#### Short Responses (Under 200 words)
|
108 |
-
```
|
109 |
-
"Quick analysis of AAPL"
|
110 |
-
"Brief summary of market trends"
|
111 |
-
"Give me a short budget recommendation"
|
112 |
-
"Simple portfolio check"
|
113 |
-
"Fast expense analysis"
|
114 |
-
```
|
115 |
-
|
116 |
-
#### Detailed Responses (Comprehensive reports)
|
117 |
-
```
|
118 |
-
"Give me a detailed report on AAPL stock"
|
119 |
-
"Comprehensive market analysis for tech sector"
|
120 |
-
"Thorough budget breakdown with recommendations"
|
121 |
-
"In-depth portfolio diversification analysis"
|
122 |
-
```
|
123 |
-
|
124 |
-
### Multi-Tool Queries
|
125 |
-
```
|
126 |
-
"Analyze AAPL stock and create a budget for investing $1000 monthly"
|
127 |
-
"What are the current market trends and how should I adjust my portfolio?"
|
128 |
-
"Help me budget $5000 income and recommend some good stocks to invest in"
|
129 |
-
"Track my expenses and suggest a better budget allocation"
|
130 |
-
```
|
131 |
-
|
132 |
-
### Advanced Queries
|
133 |
-
```
|
134 |
-
"I have $50K to invest. Analyze current market trends, suggest a diversified portfolio, and create a budget for monthly investments of $2000"
|
135 |
-
"Detailed analysis: Review AAPL, MSFT, and GOOGL stocks, then help me rebalance my portfolio"
|
136 |
-
"Comprehensive financial review: Budget analysis for $8000 monthly income, and investment recommendations"
|
137 |
-
```
|
138 |
-
|
139 |
## π― Response Types
|
140 |
|
141 |
The system automatically detects your preference:
|
@@ -153,7 +82,7 @@ The system automatically detects your preference:
|
|
153 |
## π§ Technical Architecture
|
154 |
|
155 |
- **Frontend**: Gradio web interface with real-time streaming
|
156 |
-
- **Backend**: LangChain agents with OpenAI GPT-4
|
157 |
- **Data Sources**:
|
158 |
- Yahoo Finance API for stock data
|
159 |
- Tavily Search API for market news
|
@@ -191,19 +120,12 @@ The system automatically detects your preference:
|
|
191 |
- Rebalancing recommendations
|
192 |
- Performance metrics
|
193 |
|
194 |
-
### Expense Tracker
|
195 |
-
- Category-wise spending analysis
|
196 |
-
- Trend detection and predictions
|
197 |
-
- Budget vs. actual comparisons
|
198 |
-
- Anomaly detection
|
199 |
-
- Spending pattern insights
|
200 |
|
201 |
## π Recent Updates
|
202 |
|
203 |
- β
**Smart Response Detection**: Automatically detects if users want short or detailed responses
|
204 |
- β
**Real LLM Streaming**: Genuine token-by-token streaming from OpenAI API
|
205 |
-
- β
**
|
206 |
-
- β
**Improved Data Analysis**: Comprehensive visualizations and insights
|
207 |
- β
**Optimized Performance**: Faster tool execution and response times
|
208 |
- β
**Collapsible Results**: Clean, organized tool output presentation
|
209 |
|
|
|
21 |
|
22 |
An intelligent financial advisory agent powered by OpenAI's GPT-4.1 and specialized financial tools. This agent provides comprehensive financial analysis, investment recommendations, budget planning, and market insights through an intuitive web interface.
|
23 |
|
24 |
+
**Watch the demo video:** [Financial Advisory Agent Demo (Hugging Face Hackathon)](https://youtu.be/vGOSAXyrQgM)
|
25 |
|
26 |
|
27 |
+
[](https://youtu.be/vGOSAXyrQgM)
|
28 |
|
29 |
## π Features
|
30 |
|
31 |
### Core Financial Tools
|
32 |
- **π Investment Analyzer**: Real-time stock analysis with technical indicators, risk assessment, and investment recommendations
|
33 |
- **π° Budget Planner**: Personalized budget creation using the 50/30/20 rule with optimization suggestions
|
|
|
34 |
- **π Portfolio Analyzer**: Portfolio diversification analysis and performance optimization
|
35 |
- **π° Market Trends Analyzer**: Real-time market news, sector analysis, and economic insights
|
36 |
|
|
|
38 |
- **π― Smart Response Type Detection**: Automatically detects if users want short summaries or detailed reports
|
39 |
- **β‘ Real-time LLM Streaming**: Live token-by-token response generation from OpenAI API
|
40 |
- **π Interactive Tool Results**: Collapsible sections for clean data presentation
|
41 |
+
- **π Comprehensive Data Analysis**: Enhanced insights for all financial data
|
|
|
42 |
|
43 |
## π οΈ Installation
|
44 |
|
45 |
1. **Clone the repository**
|
46 |
```bash
|
47 |
+
git clone https://huggingface.co/spaces/Agents-MCP-Hackathon/Financial-Advisory-Agent.git
|
48 |
+
cd Financial-Advisory-Agent
|
49 |
```
|
50 |
|
51 |
2. **Install dependencies**
|
|
|
54 |
```
|
55 |
|
56 |
3. **Set up environment variables**
|
57 |
+
Set environment variables:
|
58 |
```bash
|
59 |
export OPENAI_API_KEY="your-openai-api-key"
|
60 |
export TAVILY_API_KEY="your-tavily-api-key"
|
|
|
65 |
python app.py
|
66 |
```
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
## π― Response Types
|
69 |
|
70 |
The system automatically detects your preference:
|
|
|
82 |
## π§ Technical Architecture
|
83 |
|
84 |
- **Frontend**: Gradio web interface with real-time streaming
|
85 |
+
- **Backend**: LangChain agents with OpenAI GPT-4.1
|
86 |
- **Data Sources**:
|
87 |
- Yahoo Finance API for stock data
|
88 |
- Tavily Search API for market news
|
|
|
120 |
- Rebalancing recommendations
|
121 |
- Performance metrics
|
122 |
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
124 |
## π Recent Updates
|
125 |
|
126 |
- β
**Smart Response Detection**: Automatically detects if users want short or detailed responses
|
127 |
- β
**Real LLM Streaming**: Genuine token-by-token streaming from OpenAI API
|
128 |
+
- β
**Improved Data Analysis**: Comprehensive insights
|
|
|
129 |
- β
**Optimized Performance**: Faster tool execution and response times
|
130 |
- β
**Collapsible Results**: Clean, organized tool output presentation
|
131 |
|