Spaces:
Sleeping
Sleeping
# Home.py (Main application homepage) | |
import streamlit as st | |
import os | |
from dotenv import load_dotenv | |
import google.generativeai as genai | |
# Load environment variables | |
load_dotenv() | |
# Page setup | |
st.set_page_config( | |
page_title="AI Financial Dashboard", | |
page_icon="📊", | |
layout="wide" | |
) | |
# Application title | |
st.title("📊 AI Financial Dashboard v2.0") | |
# Display application information | |
st.markdown(""" | |
## Welcome to AI Financial Dashboard | |
This is an intelligent financial analysis application using AI to help you make smarter investment decisions. | |
### Main Features: | |
1. **💬 Chat with AI Financial Analyst**: | |
- Search for stock information | |
- View price charts | |
- Convert currencies | |
| |
2. **📄 In-depth Stock Analysis Report**: | |
- Comprehensive analysis of a specific stock | |
- Data collection from multiple sources | |
- Generate in-depth reports with AI evaluation | |
| |
3. **📰 Daily Market Summary Newsletter** (Coming soon): | |
- Compilation of latest financial news | |
- Categorized by topic | |
- Daily market updates | |
### How to Use: | |
Use the navigation bar on the left to switch between different features of the application. | |
""") | |
# Display API connection status | |
st.sidebar.title("Connection Status") | |
# Check API keys | |
api_keys = { | |
"GEMINI_API_KEY": os.getenv("GEMINI_API_KEY"), | |
"ALPHA_VANTAGE_API_KEY": os.getenv("ALPHA_VANTAGE_API_KEY"), | |
"NEWS_API_KEY": os.getenv("NEWS_API_KEY"), | |
"MARKETAUX_API_KEY": os.getenv("MARKETAUX_API_KEY"), | |
"TWELVEDATA_API_KEY": os.getenv("TWELVEDATA_API_KEY") | |
} | |
# Display status of each API | |
for api_name, api_key in api_keys.items(): | |
if api_key: | |
st.sidebar.success(f"✅ {api_name.split('_KEY')[0].replace('_', ' ')}") | |
else: | |
st.sidebar.error(f"❌ {api_name.split('_KEY')[0].replace('_', ' ')}") | |
# Display project information | |
st.sidebar.markdown("---") | |
st.sidebar.markdown(""" | |
### Project Information | |
- **Version**: 2.0 | |
- **Update**: In-depth analysis report feature | |
""") |