Chat to Analytics is a Streamlit-based app that allows users to query data from multiple sources (PostgreSQL, MySQL, MSSQL, or CSV) using natural language powered by LLMs (Ollama).
- 🔌 Connect to PostgreSQL, MySQL, MSSQL or upload a CSV
- 💬 Ask data questions in plain English
- 📄 View the generated SQL
- 📊 Visualize results instantly
- 💾 Chat history is stored locally in
chat_history.json - 🧠 LLM Provider: Ollama with local model support
- 🌙 Optional Dark Mode toggle
- 🗂️ Tabbed interface (Chat | SQL | Visuals)
pip install -r requirements.txtYou also need to install Ollama locally and pull a model (e.g., mistral, qwen, llama3):
ollama pull mistral- Connect a Data Source
- Use PostgreSQL, MySQL, MSSQL, or CSV upload.
- Ask a Question
- Your question is sent to an LLM to generate SQL.
- Run & Visualize
- The SQL is run on the selected data source.
- Results are shown in table and chart format.
To run locally:
streamlit run ui/app.py📁 agents/
└── sql_generator.py
📁 data_connectors/
├── connectors.py
└── schema_inspector.py
📁 ui/
└── app.py
MIT License © 2025 Praneeth Bollina
Found a bug or need help? Raise an issue or reach out directly!