An AI-powered financial charting application that helps users search and generate interactive charts from MacroMicro (MM) financial data using Gemini AI.
- 🔍 Intelligent chart search using natural language queries
- 🎨 Dynamic chart generation with Highcharts
- 💰 Real-time token usage and cost tracking
- 🌐 Interactive web interface with Streamlit
- 📊 Access to comprehensive MacroMicro financial datasets
-
Clone the repository
git clone https://github.com/x1001000/mm-ai-charting.git cd mm-ai-charting
-
Install the requirements
pip install -r requirements.txt
-
Set up your secrets Create a
.streamlit/secrets.toml
file with:GEMINI_API_KEY = "your_gemini_api_key" CHART_DATA_API = "your_chart_data_api_endpoint"
-
Run the app
streamlit run streamlit_app.py
- Enter a financial chart query in Chinese or English (e.g., "小台散戶", "柯博文指數", "美債殖利率vs基準利率")
- Click the "✨生成圖表" button (automatically enabled when text is entered)
- Wait for AI to search, load, and generate the interactive chart
- View token usage and costs in the sidebar
- Streamlit - Web application framework
- Google Gemini AI - Chart search and code generation
- Highcharts - Interactive chart rendering
- Gradio Client - API integration for chart data
- MacroMicro - Financial data source