How sbalakumar98/ai-expense-analyzer works
This is a single-file Streamlit expense-analysis app. Users upload CSV or Excel data, preview the loaded rows, then ask questions answered by a LangChain Pandas DataFrame agent using local Llama 3 through Ollama. The distinct stages are upload, file parsing, agent setup, question analysis, and result display. These components share app.py; the graph reflects calls and data flow visible there, without assuming additional subsystems.
Main entry points: app.py DataFrame agent
Components 13
User interface
- Streamlit app
app.py - File upload
app.py - Data preview
app.py - Question input
app.py - Analysis result
app.py
Data analysis
- CSV / Excel loader
app.py - Pandas DataFrame
app.py - Agent setup
app.py - DataFrame agent
app.py - Python analysis tool
app.py
Local inference
- ChatOllama client
app.py - Ollama / Llama 3
Other components
- User
Connections 15
- User → File upload: uploads file
- File upload → CSV / Excel loader: provides file
- CSV / Excel loader → Pandas DataFrame: loads data
- Pandas DataFrame → Data preview: previews rows
- Pandas DataFrame → Agent setup: provides DataFrame
- Agent setup → ChatOllama client: configures model
- Agent setup → DataFrame agent: creates agent
- User → Question input: asks question
- Question input → DataFrame agent: invokes agent
- DataFrame agent → ChatOllama client: requests reasoning
- ChatOllama client → Ollama / Llama 3: sends prompts
- DataFrame agent → Python analysis tool: dispatches analysis
- Python analysis tool → Pandas DataFrame: analyzes data
- DataFrame agent → Analysis result: returns output
- Analysis result → User: displays result