From the course: Generative AI Imaging Tools for Developers

Unlock this course with a free trial

Join today to access over 24,000 courses taught by industry experts.

Challenge: Sticker generator

Challenge: Sticker generator

(bright synth music) - [Instructor] It's time for a challenge, and in this one, we're going to take some of the functionality we've been working on, and add it to the context of a small web application. So your challenge is to implement the enhance prompt function so that the app will generate stickers for a tech conference, or a trade show. Now let's go ahead and take a look at our application in our code editor. So here I am in oh one oh four, and this is a flask application. First, we have an app dot pi. We have our imports on the top. We instantiate a flask application as well as an OpenAI client. Then we have this enhanced prompt function that takes the user's input. So make sure that you make it so that the prompt will be returned after being enhanced. Next, we have this index route that returns the front end of our application. Now, the front end of this application is pretty simple, just for the scope of this course. Next, we have a post route, and when we post a user's…

Contents