@cocktails@botsin.space is a Mastodon bot that does the same.
I haven't yet packaged the code for release, but if you'd like to see it, just find me at @bethskw on twitter or @bethskw@wandering.shop on Mastodon and ask. The bot is written in python and requires textgenrnn and either tweepy (for twitter) or pawopy (for mastodon).