Fediverse ebooks bot using neural networks https://social.exozy.me/@ta180m/107833248217767420
Go to file
2022-02-22 16:57:12 -06:00
.gitignore Initial commit 2022-02-20 18:58:25 -06:00
bot.py Save entire model after training 2022-02-21 16:47:59 -06:00
data.py Modify data generation script for transformers 2022-02-22 16:57:12 -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 Add some transformers documentation to README 2022-02-22 16:17:38 -06:00
train.py Move train.py to train_lstm.py and add new transformers training code 2022-02-22 16:12:13 -06:00
train_lstm.py Move train.py to train_lstm.py and add new transformers training code 2022-02-22 16:12:13 -06:00

ebooks

Fediverse ebooks bot using neural networks

Usage

First, install Python dependencies with pip install psycopg2 torch transformers datasets Mastodon.py. 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!

Resources