From 94bd85860964b7999f0315e3691c2b6a4726c53c Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Wed, 23 Feb 2022 10:07:50 -0600 Subject: Add flag for bot.py data --- bot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index 2ffb93d..7ec5231 100644 --- a/bot.py +++ b/bot.py @@ -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] -- cgit v1.2.3-70-g09d2