ChartGPT / README__CN.md
xiaofeifei's picture
update requirements.txt
22f6e93
# 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