diff options
author | Anthony Wang | 2022-02-23 10:07:50 -0600 |
---|---|---|
committer | Anthony Wang | 2022-02-23 10:07:50 -0600 |
commit | 94bd85860964b7999f0315e3691c2b6a4726c53c (patch) | |
tree | c569a41f82c0fe38069c77a8bb82e1cc777370fe | |
parent | 4c0afade32009f24b355eb5e4a52dcbf0e510b2f (diff) |
Add flag for bot.py data
-rw-r--r-- | bot.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -9,6 +9,8 @@ parser = ArgumentParser() parser.add_argument('-i', '--instance', help='Mastodon instance hosting the bot') parser.add_argument('-t', '--token', help='Mastodon application access token') parser.add_argument('-n', '--input', help='initial input text') +parser.add_argument('-d', '--data', default='data', + help='data for automatic input generation') parser.add_argument('-m', '--model', default='model', help='path to load saved model') args = parser.parse_args() @@ -44,7 +46,7 @@ if args.input is None: 'I think' ]) else: - with open('data', 'r') as f: + with open(args.data, 'r') as f: line = choice(f.readlines()).split() args.input = line[0] + ' ' + line[1] |