xenua
3 years ago
1 changed files with 39 additions and 0 deletions
@ -0,0 +1,39 @@ |
|||||||
|
# gpt2-fedibooks |
||||||
|
|
||||||
|
... is (or will be) a gpt2-based bot based on someone's mastodon posts. WIP. |
||||||
|
|
||||||
|
|
||||||
|
getting started |
||||||
|
--- |
||||||
|
|
||||||
|
(these steps assume you have python installed. this has only been tested with python 3.10, but it should work with >=3.8) |
||||||
|
|
||||||
|
grab an archive of your fedi data. in the mastodon web interface this is under |
||||||
|
settings / import and export / data export. |
||||||
|
unzip the file, locate outbox.json |
||||||
|
|
||||||
|
create a virtual environment, activate it, and install requirements |
||||||
|
```sh |
||||||
|
python -m venv env |
||||||
|
source env/bin/activate |
||||||
|
pip install -r requirements.txt |
||||||
|
``` |
||||||
|
|
||||||
|
(optionally) edit the config.py file in the root of this repo |
||||||
|
|
||||||
|
run the init command: |
||||||
|
```sh |
||||||
|
python src/fedibooks.py init /path/to/outbox.json |
||||||
|
``` |
||||||
|
|
||||||
|
this will take a while, depends on your settings; |
||||||
|
assuming default settings it should take an hour or two on modern cpus |
||||||
|
|
||||||
|
then you can generate: |
||||||
|
```sh |
||||||
|
python src/fedibooks.py generate |
||||||
|
``` |
||||||
|
|
||||||
|
this will print a generated text snippet to stdout, which you can then pipe into a piece of software that posts it to fedi, or you could contribute to this project and implement posting directly |
||||||
|
|
||||||
|
enjoy and have fun :D |
Loading…
Reference in new issue