A Streamlit application that acts as your personal data visualization expert, powered by local LLMs.
Simply upload your dataset and ask questions in natural language --- the AI agent will analyze your data, generate visualizations, and provide insights through charts, statistics, and explanations.
Output (AI-generated Report):
----
Ask questions about your data in plain English
-
Get instant visualizations and statistical analysis
-
Receive explanations of findings and insights
-
Interactive follow-up questioning
-
Automatic choice of appropriate chart types
-
Dynamic visualization generation
-
Statistical visualization support
-
Custom plot formatting and styling
-
Llama 3.1 8B for lightweight, fast analysis
-
Llama 3.2 for balanced reasoning
-
DeepSeek R1 7B for detailed insights
-
Qwen 2.5 7B for quick queries
-
Mistral for flexible analysis
1. Clone the Repository
`git clone https://github.com/<your-username>/ai-data-visualization-agent.git
cd ai-data-visualization-agent`2. Install Dependencies
`pip install -r requirements.txt`3. Install Ollama (for local models)
- Download Ollama 👉 https://ollama.com/download
- Pull a model (e.g., Llama 3.2):
`ollama pull llama3.2:latest`4. Set up E2B (for safe code execution)
- Get a free API Key: https://e2b.dev/docs/legacy/getting-started/api-key
- Store it in your environment:
`export E2B_API_KEY=your_api_key_here`5. Run the Streamlit App
`streamlit run app.py`-
Upload a CSV file (e.g.,
customers.csv) -
Ask: "Show me the number of customers per city"
-
The agent normalizes column names (case-insensitive), generates Python code, runs it in a sandbox, and displays the chart.
This project is for educational and experimental purposes only.
It is not a production-ready tool. Please ensure you handle sensitive datasets responsibly.
