← All Posts
New series: Turning handwriting into a blog using Text Recognition and help from GPT-3
May 03, 2022
👋 Hi again!
I’m building my own version of paperwebsite.com (a site that lets you turn photos of handwriting into real-life websites) so that my mum can do some travel blogging.
The post you’re reading right now is an intro. There will be more posts to come. I promise!
A couple of months ago, Ben Stokes wrote a fantastic blog post that reached the top of hacker news about how he made his latest “tiny project” Paperwebsite.com:
🎉 Introducing Paper Website, my next tiny project!
— Ben Stokes (Tiny Projects💡) (@tinyprojectsdev) November 10, 2021
📖 Start a tiny website from your notebook
✍️ Write your website/blog using pen & paper
🤳 Take a photo of your page to turn it into a live website
🚀 So excited to launch this! https://t.co/0BVaxkCg8j pic.twitter.com/EEd4tjvs5c
My mum has been known to do a little blogging on her various projects and is planning to spend some time travelling around in a camper van. I thought a “paper website” could be a nice way for her to do some writing on the road.
Maybe a subscription to Ben’s website could be a good Christmas present?
Or, maybe, this was a good opportunity for a little project. Handmade gifts are more thoughtful, right? I had been looking for a reason to give a large language model like GPT-3 a go…
First, an admission. I have a track record of delivering handmade presents a little beyond the special day in question.
My sister had to wait two years to get some hand-cast concrete plant pots for her birthday. To shift the risk away from me, I’ve now started backing Kickstarter projects for gifts——at least this way, when it arrives a year or two late, it’s not really my fault.
My two nuggets of side project wisdom:
- Make it “tiny”. You’re racing to finish before (a.) you run out of steam and start to question why you’re coding in your free time or (b.) a new, seemingly more exciting project pops into your head.
- Deadlines can be helpful, but they must be realistic. A deadline is good motivation to get something done. However, if the deadline is too far away, you’ll run into the same problems as (1.). If it’s too near, it’s just not going to happen because you’re trying to do an entire tech project in a few spare hours a week.
I’d need a more realistic deadline than Christmas to have any chance of this being ready in time. Better make this a Birthday present (don’t tell her) to allow for a few extra months.
So now I have a side project with an important-enough deadline that it might actually make it past the fun stage of tinkering around with some new tech.
The plan: build my own version of paperwebsite.com for travel blogging.
What I know so far:
- I’ll write a front end (probably using nextjs or maybe remix) for uploading photos of a handwritten blog to some kind of image store
- I’ll use gadget.dev (this is a new fully managed serverless stack I’ve been looking to try out) for its hosted database, file storage and graphql layer. I can use these features to model and store blog posts and their associated images and use Gadget’s serverless functions to set up a data pipeline to run the magical ML.
- This app will only have one user (my mum)——I’m not trying to compete with paperwebsite.com here.
What image processing will I need?
- I’ll use the Google Cloud Vision API Document Text Detection endpoint to get some words out of each image
- Like Ben Stokes, I’ll use GPT-3 as a glorified grammar checker (
Prompt >> “This is a spelling and grammar corrector that corrects poor English...”
) - I will probably also use GPT-3 to do a bit of AI layout editing to add in some line breaks (as from initial experiments with the Cloud Vision API, it’s not that great at breaking things up into paragraphs)
Where will I host the blog pages?
- In the interest of “time to market”, I’ll push the cleaned-up text to a publicly available Notion page. My mum can use Notion’s built-in rich text editor to add links and photos (and maybe correct GPT-3 where it’s been a little too creative with its copy editing).
I don’t know how I’ll turn all that into some posts. Maybe I’ll split it by technology, or if not, by feature. We’ll have to wait to find out!
See you soon!
I, Pete Taylour, shall be writing up some projects.
I'm a full-stack software dev from London Brighton.