File size: 1,652 Bytes
22f6e93
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# ChartGPT
ChartGPT allows data lake visualization as a graph through dialogue.  
This project borrows some code from the  [Viusal ChatGPT]( https://github.com/microsoft/TaskMatrix.git) project

## Effect Display
### 柱状图
![柱状图](./assets/bar.jpg)

### 折线图
![折线图](./assets/line.jpg)

### 饼图
![饼图](./assets/pie.png)

### 散点图
![饼图](./assets/scatter.png)

## 示例输入
```markdown
例一:
将[2,4,5,6,10,20,100]可视化为柱状图

例二:
将[2,4,5,6,10,100,120,200,135,50,10]可视化为折线图

例三:
将下面的数据可视化为饼图
['A', 'B', 'C', 'D', 'E']
 [25, 20, 15, 10, 30]

例四
Visualize [2,4,5,6,10,100,120,200,135,50,10] as a line chart

例五:
将下面的数据可视化为散点图
x = [1, 2, 3, 4, 5]
y = [5, 4, 3, 2, 1]

```

## Quick Start

```shell
# clone the repo
git clone https://huggingface.co/spaces/xiaofeifei/ChartGPT

# Go to directory
cd ChartGPT

# create a new environment
conda create -n chartgpt python=3.8

# activate the new environment
conda activate chartgpt

#  prepare the basic environments
pip install -r requirements.txt

# prepare your private OpenAI key (for Linux)
export OPENAI_API_KEY={Your_Private_Openai_Key}

# prepare your private OpenAI key (for Windows)
set OPENAI_API_KEY={Your_Private_Openai_Key}

# start!
python app.py 
```


## Acknowledgement
We appreciate the open source of the following projects:
[TaskMatrix]( https://github.com/microsoft/TaskMatrix.git)  
[LangChain](https://github.com/hwchase17/langchain)  



Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference