erinbugbee / dash-gpt3-bars

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dash GPT-3 Bar Charts Generation

demo

Try it now

This Dash app lets you write a simple description, and GPT-3 can automatically generate the PX code to produce a bar chart for you.

It only took one Plotly Express code snippet for it to learn how to create bar charts:

snippet

For a smoother demo, watch the video here.

OpenAI GPT-3 API Access

In order to obtain access to the GPT-3 API, you will need to join the waitlist. Once you have the API, you can find the secret key in the quickstart, and export it as an environment variable:

export OPENAI_KEY="xxxxxxxxxxx"

Where "xxxxxxxxxxx" corresponds to your secret key.

Instructions

To get started, first clone this repo:

git clone https://github.com/plotly/dash-sample-apps.git
cd dash-sample-apps/apps/dash-gpt3-bars

Create a conda env:

conda create -n dash-gpt3-bars python=3.7.6
conda activate dash-gpt3-bars

Or a venv (make sure your python3 is 3.6+):

python3 -m venv venv
source venv/bin/activate  # for Windows, use venv\Scripts\activate.bat

Install all the requirements:

pip install -r requirements.txt

You can now run the app:

python app.py

and visit http://127.0.0.1:8050/.

Discussions

If you are interested in chatting with us about the technical aspect of this, or would like to share the Dash apps you created with your own OpenAI API tokens, join the discussion thread.

GPT-3 for Enterprises

If you are interested to use Dash and GPT-3 in an enterprise setting, please reach out, and we'd be happy to discuss how we can help with Dash Enterprise.

About


Languages

Language:Python 100.0%