File size: 941 Bytes
5fab2dd
 
 
 
 
 
 
 
 
 
 
 
 
ac20a09
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: Csv Chatbot
emoji: 📊
colorFrom: yellow
colorTo: gray
sdk: gradio
sdk_version: 4.37.1
app_file: app.py
pinned: false
---



# CSV Chatbot

This is a simple LLM agent that can do simple data analysis over csv data. It generates a python code using pandas library to do the analysis. Then that python code is executed and the output is returned to the user.

### Setup

```bash
cp .env.example .env

# Edit .env file and add your OpenAI API key

pip install -r requirements.txt
```

### Usage

```bash
python main.py
```

### Example

![](./assets/demo_1.png)

### Limitations
* It does not execute the code in a sandbox environment. So, it can execute any code that is written in the python code generated by the agent.
* Messages history is not taken into account. So, the agent does not have any context of the previous messages.
* More advanced libraries like langchain can be used to manage complex queries and control flows.