Black Lives Matter. Please consider donating to Black Girls Code today.

Automatically generate Plotly charts using GPT-3

Hey all! In this thread, I wanted to share a GPT-3 app we have made, and start a follow up discussion to our tweets (please check them out for more context).

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


Hey there!

This looks great. Was actually planning on making something like this with GPT-3 just in reverse and making use of Network graphs.

Plotly doesn’t seem to provide immediate functionality with network graphs. Is there an easy way to go about this while adhering to the token limits?

Interesting use case, can’t wait to see a demo of it!

If you’d like to use networks with Dash, highly recommend to check out Dash Cytoscape, which was recently updated to v0.2.0. It wraps around cytoscape.js, and adds so Dash-specific features.

1 Like

Hey all! The video for our second demo is available here:

It shows GPT-3 generate line charts from a preloaded dataset (Gapminder) based on natural language instructions we are giving it.

You can even tell it to correct the plot, or change the columns being visualized!


hi, can you share the source code for this?

Really nice. Great job. I can see this being a really useful helper app for dash users where users can write what type of chart they want and this suggests the code and then you can copy and paste into your own app/notebook/etc. I would totally use it.

We are currently in touch with OpenAI to ensure that we are releasing code that complies with their deployment conditions. Although I’d love to release the code for people to try out, it’s important to consider the broader impact of applications integrating GPT-3.

Thanks for the kind words! You can join the waitlist to access the beta API for GPT-3:

Hello all, I realized I didn’t share video links for the first and latest demo, so here are they are:

Dash Chatbot

Dash Bar Chart Generator