That's really cool! I made something similar but much simpler using R Shiny.
Edit: Looking at the featured story, I notice that the character illustration is not consistent currently. I got relatively consistent character illustration from scene to scene by asking the LLM to write a prompt for image generation based on the story text and use the same character description in each sentence. That got me pretty consistent character drawings. Also, to keep the same drawing style, my prompt was like:
Drawing style e.g., Digital painting {drawing prompt}
Thanks for the feedback! I’ll be incorporating that. The scene is described with the dynamic image prompting however there’s nothing on style in the prompt.
I’ll update the prompt and see how it works. Thanks again!
This was a fun project for shiny app contest. This app allows users to generate AI-written stories and illustrations. The app captures user inputs—such as the story’s opening sentence, number of sentences, drawing instructions, and title—and utilizes Cloudflare’s Workers Model API for text generation (Llama 3.1) and image generation (Stable Diffusion). The app compiles story content and images into a Quarto-based revealjs slide deck that is generated in the app. Users may also change the theme of the slide deck. I hope you have fun generating different stories if you give it a go.
I am working on an app for creating stories with illustrations in a revealjs slide deck.
The idea is that a user would handwrite or type the first sentence of a story they want to write. This sentence would be used by llama 3.1 as a prompt to make a short story. Then the story is fed to stable diffusion to create image illustrations. Finally, all of it is combined into a slide deck that users can see in the app and also download if they want.
This looks really cool. I have experience with shiny apps in R, and Python has a shiny package too now. FastHTML looks a lot like Python shiny without routes. I think both of these frameworks are great for people with no web dev experience. It would be great if there is some discussion of htmx and why it is used in the tutorials section of FastHTML docs.
Shiny and FastHTML are both built on top of Starlette, so both use the same routing implementation. FastHTML by default uses a `RouteX` subclass that adds quite a bit of functionality to Starlette routes (mainly around automatically passing in the needed parameters for a handler).
There's quite a bit of background of why HTMX is used, particularly these two sections of about.fastht.ml:
What do you think about the mechanics of machine learning book by Jeremy Howard? It seems to have a systematic approach to fit models and improve them.
At risk of being excessively cheeky, I think you should throw it into xgboost and not worry about it.
I love Jeremy Howard, but if you're doing applied ML on tabular data, tweaking specifics of model construction probably won't get you anything beyond stock xgboost. The concerns highlighted by your sibling commenter jamesblonde end up eating most of your time in deployed ML products, not model construction.
If you're looking to learn about ML model construction I'm sure it's a great book.
Edit: Looking at the featured story, I notice that the character illustration is not consistent currently. I got relatively consistent character illustration from scene to scene by asking the LLM to write a prompt for image generation based on the story text and use the same character description in each sentence. That got me pretty consistent character drawings. Also, to keep the same drawing style, my prompt was like:
Drawing style e.g., Digital painting {drawing prompt}