Introducing mopaint more seriously
2025-04-12
I started mopaint as an April fools joke. It's a widget for notebooks that looks like MSPaint. It started out as a joke but I ended up liking it so much for demos that I added some extra features for it as well as some quality of life features.
Besides having a thin marker to draw with, you now also have a thick marker available in your Python notebooks to draw whatever you see fit!

And because this is an anywidget, you can also fetch the drawn image to pass along to another part of your (LLM) stack. Been having a lot of fun with this tool and Gemini recently.
If you want to see a demo, you can go to Github pages or play with the iframe below (made possible by marimo-snippets).
import marimo as mo
from mopaint import Paint
from mohtml import img
widget = mo.ui.anywidget(Paint(height=450))
widget
img(src=widget.value["base64"]) # Use base64 representation directly with mohtml