This is a great start, but it needs some more patterns. "How/why <noun> <verb> <noun>" may well be the most popular Medium title construction, but I would suggest looking for a few more. Here's a few to start:
I was expecting a Markov chain manipulating a huge array of aggregated Medium titles but as simple as the cotton candy titles of Medium are so is this script.
This makes me think how much I would like a HN without opinion pieces.
Was that an opinion you just had right there?
In my opinion, s/he did.
"How Making Tacos Enhanced the Toilet Paper I Used."