Remix.run Logo
timje1 5 days ago

Seems like open AI is rate limiting me for a minute, I didn't expect to get top of HN this quickly. Use Starmer's for now - WC2B6NH

dom96 5 days ago | parent [-]

Why didn't you just create the images for all 650 MPs ahead of time?

timje1 5 days ago | parent [-]

Because that's expensive as hell and I didn't know if anyone would visit the site..

epanchin 4 days ago | parent | next [-]

Ideally you would save them as they were generated, and deliver the saved version the second time?

timje1 4 days ago | parent [-]

Yup, that's what happens. If you request a postcode that leads to an MP that's not been seen before, it starts generating that MP and saves the ongoing promise, and gives that promise to everyone else to asks for that MP.

Had to make sure to implement this so that I didn't end up generating duplicates.

dom96 5 days ago | parent | prev [-]

Really? Does it really cost that much to generate a single image like this?

timje1 5 days ago | parent [-]

yeah to generate a photo of reasonable quality it costs like $.18, so multiply that by 650ish MPs and you have a pretty expensive lil parody site...

aspenmayer 5 days ago | parent [-]

Make hay while the sun shines. ~$120 upfront would make this an order of magnitude more expensive than a vanity domain name already, but if you had precomputed and cached them you’d be capitalizing on the viral momentum.