Skip to content

Commit

Permalink
Fix api setting
Browse files Browse the repository at this point in the history
  • Loading branch information
blafea committed Jun 17, 2024
1 parent 3a2de82 commit 0acbf96
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ async def main(args):

global HF_API_TOKEN_LIST
HF_API_TOKEN_LIST = HF_API_TOKEN_LIST.split(' ')
set_hf_api_token(0)
set_hf_api_token()

global session
session = aiohttp.ClientSession()
Expand Down Expand Up @@ -408,7 +408,6 @@ def parse_args():
def set_hf_api_token(idx=None):
if idx is None:
# Randomly choose one token
import random
idx = random.randint(0, len(HF_API_TOKEN_LIST)-1)

logger.info(f"Use HF API token {idx}")
Expand Down

0 comments on commit 0acbf96

Please sign in to comment.