Skip to content

Commit

Permalink
Fix bug with huggingface headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohaska authored Mar 3, 2023
1 parent 7af5b81 commit 6eeee07
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
e.g. Who would Donald Trump agree with, 1, 2, 3, or 4?"""

for index in range(len(NATIONSTATES_PASSWORDS)):
print(f"Starting up thread {index+1}...")
logging.info(f"Starting up thread {index+1}...")
print(f"Starting up thread {index + 1}...")
logging.info(f"Starting up thread {index + 1}...")
ns_ai_thread = threading.Thread(target=ns_ai_bot, args=(
NATION[index], NATIONSTATES_PASSWORDS[index], huggingface_headers, API_URL, prompts[index], USER_AGENT))
NATION[index], NATIONSTATES_PASSWORDS[index], {"Authorization": f"Bearer {HF_API_TOKEN}"}, API_URL,
prompts[index], USER_AGENT))
ns_ai_thread.start()
print(f"Started up thread {index + 1}. Waiting 30 seconds before starting up next thread...")
logging.info(f"Started up thread {index + 1}. Waiting 30 seconds before starting up next thread...")
time.sleep(30)


0 comments on commit 6eeee07

Please sign in to comment.