|
|
--- |
|
|
title: AI-Chat-to-Visual |
|
|
emoji: π |
|
|
colorFrom: yellow |
|
|
colorTo: blue |
|
|
sdk: gradio |
|
|
sdk_version: 5.33.1 |
|
|
app_file: app.py |
|
|
pinned: true |
|
|
license: apache-2.0 |
|
|
tags: |
|
|
- agent-demo-track |
|
|
short_description: AI chart generator by chatting with your data |
|
|
--- |
|
|
|
|
|
# π¬ Terloka Data Insight Tool |
|
|
|
|
|
**Terloka Data Insight Tool** is an interactive, AI-powered data exploration and visualization tool for analytics. |
|
|
Built with **Gradio**, **LangGraph**, **Gemini Pro (Google Generative AI)**, and **Altair**, it enables users to: |
|
|
|
|
|
- π Upload datasets |
|
|
- π§ Converse with an intelligent LLM assistant |
|
|
- π Automatically generate meaningful charts and visual insights |
|
|
- π¬ Get explanations without writing code |
|
|
|
|
|
[Product Demo](https://yotu.be/2bQNJnDkzGE) |
|
|
|
|
|
--- |
|
|
|
|
|
## π― Project Goals |
|
|
|
|
|
- Empower business users, analysts, and domain experts to explore data **using natural language**, not code. |
|
|
- Lower the barrier to insight generation by integrating **LLM-driven interfaces** with **automated visualization tools**. |
|
|
- Create a flexible foundation for conversational analytics across verticals (e.g., travel, e-commerce, finance). |
|
|
|
|
|
--- |
|
|
|
|
|
## βοΈ Capabilities |
|
|
|
|
|
1. **π File Upload** |
|
|
Supports `.csv`, `.xls`, and `.xlsx` formats via the Gradio UI. |
|
|
|
|
|
2. **π€ Conversational Chatbot** |
|
|
Interact with a Gemini-powered LLM to analyze and visualize your data through natural language. |
|
|
|
|
|
3. **π Auto Visualization** |
|
|
Automatically generates Altair plots based on your questions or commands. |
|
|
|
|
|
4. **π§Ύ Schema & Summary View** |
|
|
View data schema, column types, null value breakdowns, and duplicates. |
|
|
|
|
|
5. **π Insight Generation** |
|
|
Each chart comes with a smart LLM-generated textual analysis based on the data. |
|
|
|
|
|
--- |
|
|
|
|
|
## π¦ Project Scope |
|
|
|
|
|
### β
In-Scope |
|
|
- Text-based interaction with the LLM. |
|
|
- Plot generation using Altair. |
|
|
- Data upload via the UI. |
|
|
- Simple exploratory analysis: aggregations, groupings, comparisons. |
|
|
- Multi-turn conversations with short-term memory. |
|
|
|
|
|
### π« Out-of-Scope (currently) |
|
|
- Multi-file joins or SQL querying. |
|
|
- Persistent storage or dashboarding. |
|
|
- Real-time data processing or streaming. |
|
|
- Access control or authentication mechanisms. |
|
|
|
|
|
--- |
|
|
|
|
|
## π§± Technical Requirements |
|
|
|
|
|
| Requirement | Description | |
|
|
|--------------------|-------------| |
|
|
| **Python** | Recommended 3.10+ | |
|
|
| **Libraries** | `gradio`, `pandas`, `altair`, `langchain`, `langgraph`, `google-generativeai` | |
|
|
| **Visualization** | Altair (for fast and declarative charting) | |
|
|
| **LLM API** | Google Gemini Pro (via `langchain_google_genai`) | |
|
|
| **Workflow Engine**| LangGraph (manages multi-step LLM workflows) | |
|
|
|
|
|
## π Logic Flowchart |
|
|
 |
|
|
|
|
|
--- |
|
|
|
|
|
## β¨ Known Limitations |
|
|
1. Only works with single flat tables (no joins). |
|
|
2. Memory is ephemeral β uploaded data not persisted across sessions. |
|
|
3. Chart library is Altair only β limited interactivity compared to Plotly. |
|
|
|
|
|
--- |
|
|
|
|
|
## πFuture Improvements |
|
|
1. Add multi-file support and relational reasoning. |
|
|
2. Enable drag-and-drop dashboard building. |
|
|
3. Switch between Altair and Plotly visual modes. |
|
|
4. Implement authentication and user-level file storage. |
|
|
5. Integrate OpenAI Assistants or Claude for broader model compatibility. |
|
|
|
|
|
--- |
|
|
|
|
|
π Credits |
|
|
Developed by Terloka Bros β building intelligent tools to empower data storytelling. |
|
|
|
|
|
An example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index). |