bedtimeStoryMaker
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
main.tsx
https://daniellevine--5837d3a0279211f09d52569c3dd06744.web.val.run
Inspired from a RedwoodJS demo I made last year, this adds generative art powered by Fal to the bedtime story maker.
Start writing a story by picking
- a style (spooky, colorful, adventurous
- an animal (penguin, mouse, unicorn, whale ...)
- a color for the animal
- and activity (befriends aliens, goes to the doctor, rides a rollercoaster, bakes a cake for friends)
It uses OpenAI to write a children's bedtime story
- title
- summary
- story
for a "fantastical story about a green whale who rides the bus" or the "spooky story about the tomato fox who explores a cave".
Then using the summary, OpenAI geenrates another prompt to describe the instructions to generate a children's story book image.
That's sent to Fal to generate an image.
Stories get saved to bedtime_stories
in SQLite for viewing, searching and maybe sharing.
You then get a bedtime story to enjoy!