Fediverse ebooks bot using neural networks https://social.exozy.me/@ta180m/107833248217767420
Go to file
2022-02-21 16:39:58 -06:00
.gitignore Initial commit 2022-02-20 18:58:25 -06:00
bot.py Reformat using autopep8 2022-02-21 15:33:17 -06:00
data.py Ignore URLs by ignoring strings with . 2022-02-21 15:49:29 -06:00
dataset.py More cleanup 2022-02-21 15:20:00 -06:00
LICENSE Initial commit 2022-02-20 18:58:25 -06:00
model.py More cleanup 2022-02-21 15:20:00 -06:00
predict.py Take top 5 instead of top 3 2022-02-21 16:39:58 -06:00
README.md Note that only Mastodon and Postgres is currently supported 2022-02-21 15:37:58 -06:00
train.py Get predictions to actually work 2022-02-21 15:49:39 -06:00

ebooks

Fediverse ebooks bot using LSTM neural networks in PyTorch

Usage

First, make sure you have psycopg2, Mastodon.py, and PyTorch installed. Currently only Mastodon with PostgreSQL is supported, but it should be easy to add support for other platforms and databases.

Generate the training data from the Mastodon database using python data.py -d 'dbname=test user=postgres password=secret'.

Next, train the network with python train.py, which may take several hours.

Finally, create a Mastodon application for your bot account and run the bot with python bot.py -i mastodon.instance -t access_token. Enjoy!