Bluesky social bot that posts randomly (AI) generated 'horoscopes' every hour.
Since the horoscopes are generated by a LLM please never assume malicious intent! :)
Follow to never miss out on your horoscope again!
This project was inspired by the astrology bot on twitter that, thanks to the latest API changes I would guess kind of died sadly. However, since moving to bluesky social I thought there was still something missing to really make it feel like home (twitter).
So I grabbed my (limited) knowledge of coding bots and my even more limited knowledge of AI and wrote this astrology bot analogue to the one on twitter.
The bot is based on the pre-trained gpt2 124M parameter language model that is linked below and was finetuned using the huggingface framework
. This means it was fed a few thousand horoscopes (thanks google colabs for the free GPU) that someone scraped from the New York Times horoscope section 7 years ago and that I was lucky to find and reuse for this project. The original dataset can also be found in the Credits section.
The resulting fine-tuned model is then used to complete a horoscope text that starts with one of the zodiac signs that will be drawn randomly without replacement every 12 hours (thats actually not what is happening for secret reasons we shuffle a list of 12 zodiac signs based on a seed that is all digits of the current date in isoformat without colons and draw the i-th element fromt this list, where i is the digit of the current hour modulo 12 (dont even ask me)). Then the bluesky social API is used to post the text to the bots account. Github actions is then set to repeat this every hour.
Right now the model files are hosted outside of the github repo for reasons I don't want to talk about because they made me lose my mind during development, let's just say I learned my lesson and will not try to host large non-text files on github or github lfs anytime soon again.
In the future I would love to increase the dataset the model was finetuned on to try and get some more meaningful horoscopes. Also, the text length is kind of buggy and will sometimes just cut off mid-sentence or add whitespaces at the end, which is something I would like to fix too. For the first one I would have to find a better (or larger) dataset maybe or try to scrape horoscopes from the internet, but who has time for these things nowadays am I right?
Inspiration: https://twitter.com/hourIyhoroscope?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor
Pretrained model used: https://huggingface.co/gpt2
Model finetuned on: https://github.com/dsnam/markovscope/blob/master/data/horoscopes.csv