Changes
1 changed files (+22/-1)
-
-
@@ -1,10 +1,23 @@from argparse import ArgumentParser import torch from mastodon import Mastodon from dataset import Dataset from model import Model from predict import predict parser = ArgumentParser() parser.add_argument('-t', '--token', help='Mastodon application access token') parser.add_argument('-i', '--input', default='data', help='training data input file') parser.add_argument('-e', '--text', default='i am', help='initial text for prediction') parser.add_argument('-d', '--device', default='cpu', help='device to run the model with') parser.add_argument('-p', '--path', default='model', help='path to load a saved model') args = parser.parse_args()
-
@@ -14,4 +27,12 @@ api_base_url='https://social.exozy.me/') mastodon.status_post('i am pretty horrible but i can keep reading the same dtb thing to be a really cool people there a notification in every fediverse in liberal democracies and games iaposd looks like to enjoy course at that goes and is it in case youaposre always welcome this time ago maybe you can start things that i think you want me to screenshot you use straw as an owl party platform in the algerian population for that have the list i just wanted to be a registry that you are out where the app actually the') dataset = Dataset(args.input, 32) device = torch.device(args.device) model = Model(dataset, 256, 256, 3, 0.2).to(device) model.load_state_dict(torch.load(args.path)) text = predict(device, dataset, model, args.text) print(text) # mastodon.status_post(text)
-