Last week, I did not have much spark to work on 1to100. My kids, my wife, and me were sick in turns and this created not the best conditions to work 📉:)
Nevertheless, I managed to do something interesting. 1to100 app is supposed to help users create their own digital art. Make pictures of the numbers from 1 to 100 and then receive their own digital art with a composition of these numbers. I had to create a code that compiles that mosaic from numbers. So I decided to work on that and also involve AI.
📝I created my own digital art:
1. I found a list of 100 art styles
2. I asked OpenAI to generate 100 images, one for each number from 1 to 100 using the specific style. As simple as:
const image = await openai.images.generate({
model: "dall-e-3",
prompt: `Draw a big number ${i+1} at the center of the picture and do not draw anything else. Use ${styles[i]}.`,
});3. Using sharp lib and chatGPT I wrote a script to combine these numbers into the 10x10 mosaic
Then I had to check numbers manually and regenerate some of them; for some, I had to do it several times. For some specific numbers (58, 63, 93), I failed to get proper pictures. It seems that it's a model limitation; despite a number of my attempts, it is not able to generate a clear number.
The final image size is 260 MB, but on the one I attach, it's also possible to see different styles and be impressed how well, in general,
dall-e-3 does its job. All the generations, including the regeneration attempts, costed me about 8$.