Text highlight as DALL-E 3 prompt

While reading analogia today there was such beautiful and descriptive language in the chapter “Tree House” that I was reading, and I was struck by a fun tiny project idea. It would be so fun while reading online to be able to highlight a bit of text and summon a tiny picture of the text, either by image searching for it or by feeding it into a stable diffusion generator like GPT3. So I added it to my site!

If you highlight any text while on my site, you will gain access to a prompt to visualize the highlighted text using DALL-E 2 from OpenAI. After the image is generated, it'll be displayed for your viewing pleasure until you're ready to dismiss it!

I want to keep my costs as low as possible, so I implemented some rate limiting for my API route thanks to this excellent article from the always wonderful Kitty Giraudel. I've always been inspired by their writing style, how they build up a well-designed utility over the course of a post, and this one is no different. So sorry folks, I've got this thing limiting you to 3 images per day.

There’s something about this idea that reminds me of how images and video are becoming more of our medium of understanding today: emoji, memes, video essays, diagrams. This plug-in idea feels like dictionary lookup for the spaces in between, like what diving birds look like hunting in a cove on a river in Vancouver beneath a tree house.

I'm starting to conceive of these stable diffusion generative tools as a visualizer for our collective unconscious. Being able to plug into that unconscious to add imaginative visuals while reading sounds like such a pedestrian use that it could be widespread someday.

Here are some fun prompts for you to try out text highlighting. Try highlighting different partial segments too! But I do recommend you at least select full words:

Then the stone door swung back with one big push, and they all went inside. There were bones on the floor and a nasty smell was in the air; but there was a good deal of food jumbled carelessly on shelves and on the ground, among an untidy litter of plunder, of all sorts from brass buttons to pots full of gold coins standing in a corner. There were lots of clothes, too, hanging on the walls — too small for trolls, I am afraid they belonged to victims — and among them were several swords of various makes, shapes, and sizes. — The Hobbit, pg 52

There were five windows. Two were small wood-framed octagons salvaged from a remodeled house; another two were tempered glass salvaged from the front of old television sets abandoned in a downtown Vancouver alley; and the fifth, the one that blew out, was a glass panel in the front door. One of the octagonal windows looked out across the inlet over Boulder Island toward Dollarton and the rocky beach at what was now the foot of Lowry Lane; the other looked out into the forest canopy behind the house. — analogia, pg 162

My palm tree is an example. Suddenly I am on a balcony and its huge swaying leaves are before me at eye level, arcing, arching, waving, cresting and breaking in the soft air, throwing the yellow sunlight up over itself and catching it on the other side, running its fingers down its own piano keys, then running them back up again, shuffling and dealing glittering decks of aqua, green, yellow, and white. It is everything I have ever loved, fernlike, featherlike, fanlike, open—lustrously in love with air and light. — On Beauty and Being Just, pg 16

Some giant in the sky pushes the head of night down into the sea and a crown of stars bubbles on up. Fizzle that way. — Strange Light, pg 16