aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-02-22 18:00:10 -0600
committerAnthony Wang2022-02-22 18:00:10 -0600
commit7f6be5c2ac8f7fc85923b55fd4a1c483eb5d5457 (patch)
tree7023740d3219e0676390dc46df65d22bfcc40a33
parentf08e5bfc5f2dbc3ab82a1b92aeec9c4c4368524f (diff)
Add instance flag for bot
-rw-r--r--bot.py5
1 files 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)