Google's Imagen 3 generates images from text prompts. Install the GenAI package, grab an API key from aistudio.google.com, then describe what you want: the demo goes from basic windows-and-mountains to adding wooden ceilings and a fireplace for a sharper result.
Chapters
First of all, you need to install the package, which is Google GenAI and Pillow for rendering the image. And then let's get the API key. And you can go to aistudio.google.com/api_key and you can get your API key there. You might need to put a credit card though. So keep that in mind. Once we've loaded the API key, now let's run it and get a prompt from it and get an image from it. So here what we're telling it to do is generate a floor-to-ceiling glass windows overlooking majestic snow-capped peaks at dusk, so it should look really awesome. And there it is, it's generated an image that looks like a very luxurious house. So let's add some detail in there as well and see if it's going to get some details. So we wanted to add some warm wooden cozy feeling, extra lighting, and modern stuff. So warm wooden ceilings, soft ambient light, and a modern fireplace. So let's, let's see what it's going to generate with that. And there you go.