From 7f6be5c2ac8f7fc85923b55fd4a1c483eb5d5457 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Tue, 22 Feb 2022 18:00:10 -0600 Subject: Add instance flag for bot --- bot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 6dda1fd..6c37fa6 100644 --- a/bot.py +++ b/bot.py @@ -5,8 +5,9 @@ from transformers import AutoTokenizer, AutoModelForCausalLM 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('-i', '--input', help='initial input text for prediction') +parser.add_argument('-n', '--input', help='initial input text') parser.add_argument('-m', '--model', default='model', help='path to load saved model') args = parser.parse_args() @@ -26,6 +27,6 @@ print(output) # Post it to Mastodon mastodon = Mastodon( access_token=args.token, - api_base_url='https://social.exozy.me/' + api_base_url=args.instance ) mastodon.status_post(output) -- cgit v1.2.3-70-g09d2