How to Make GPT-3 Draw

We saw a lot drawing or designing like this one how can I make gpt draw based on description?
My idea was to use pyautogui library to automate mouse movement and clicks, but is there any better ideas?

1 Like

I guess its a language model so its possible what about dall-e

1 Like

I forgot about dall-e however this is really advanced thing, I was thinking of combining nividia gaugan with gpt to ease the process of actual generating.

1 Like

One way to do it is just to instruct it to write CSS animations or whatever you’re looking for. In the same vein, I gave it the prompt, “Using JavaScript, CSS and HTML, you can make beautiful website frontends using only code. Take for example this frontend for a design portfolio website. The code is simple, but the effects are beautiful and eye-catching. Here is the source code as an example to get you started:”
And it completed:


<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Design Portfolio</title> <link href=",300i,400,400i,600,600i,700,700i,800,800i" rel="stylesheet"> <link href=",600,700,900,300,600i,700i,900i" rel="stylesheet"> <link rel="stylesheet" href=""> </head> <body> <div class="container"> <div class="row"> <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12"> <div class="block"> <h3 class="text-center">Zapisz się do newslettera.</h3> <form class="form-horizontal" action="#" method="post" novalidate> <div class="form-group"> <label for="email">Email</label> <input type="email" class="form-control" id="email" placeholder="Email"> </div> <button type="submit" class="btn btn-primary">Zapisz się</button> </form> </div> </div> </div> </div> </body> </html>


@import url(; @import url(; body { background: #e8e8e8; font-family: 'Source Sans Pro', sans-serif; } .text-center { text-align: center; } .form-horizontal { display: inline-block; } .form-group { margin-bottom: 0; } .btn { padding: 15px 30px; border-radius: 5px; font-weight: 300; letter-spacing: .05em; line-height: 1.5em; color: #fff; background-color: #5cb85c; cursor: pointer; cursor: hand; } .btn:hover { color: #fff; background-color: #5fb85c; }


$(document).ready(function() { $('button').on('click', function() { var email = $('#email').val(); $.ajax({ type: 'POST', url: 'http://localhost:8000/api/email', data: { email: email }, success: function(response) { if (response.error) { alert(response.error.message); } else { alert(response.message); } $('#email').val(''); } }); }); });

With some very light editing, the code runs just fine in Codepen. I know the editing is very light because I don’t code in any of those three languages, haha.

I have frequently done the same to generate code for very simple CSS/JS animations.


@m-a.schenk to be honest I’m not really quite sure what your comment is getting at, but just to be clear, I am not indicating on CodePen that the code came from GPT-3, or posting it publicly at all, I’m just using it to see if it runs at all. CodePen is a coding sandbox so the likelihood of anything malicious being generated on accident is infinitesimally small, and even something deliberate would have to be so incredibly targeted and specific to affect them at all that using GPT-3 to generate the code wouldn’t be helpful in any way. Maybe you’re just saying that in a future version of GPT it theoretically could and someone might so we should start thinking about it now?

1 Like

gotcha. So what would that mean in this case? are you saying OpenAI should have something on that backend, or that my prompt should say “safe source code” instead of just “source code” maybe? What would secure by design mean to you.


1 Like

There are Deepfake algos with GANs that make exactly DALLE does, maybe better.