sqfoo commited on
Commit
237cd28
·
verified ·
1 Parent(s): 78fa933

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -19,7 +19,6 @@ from utils import PROMPT, INPUT_PROMPT, extract_after_final_answer
19
 
20
  # Initialize the HF Inference Client
21
  # It will automatically pick up the HF_TOKEN environment variable if it's set
22
- client = InferenceClient(timeout=60)
23
 
24
  # Define the models we want to use from the Hugging Face Hub
25
  LLM_MODEL = "Qwen/Qwen2.5-7B-Instruct"
@@ -121,6 +120,9 @@ def play_turn(human_response, loc, player, cur, custom_token, request: gr.Reques
121
  }
122
  ]
123
  try:
 
 
 
124
  response = client.chat_completion(
125
  model=LLM_MODEL,
126
  messages=messages,
 
19
 
20
  # Initialize the HF Inference Client
21
  # It will automatically pick up the HF_TOKEN environment variable if it's set
 
22
 
23
  # Define the models we want to use from the Hugging Face Hub
24
  LLM_MODEL = "Qwen/Qwen2.5-7B-Instruct"
 
120
  }
121
  ]
122
  try:
123
+ client = InferenceClient(
124
+ api_key=chosen_token
125
+ )
126
  response = client.chat_completion(
127
  model=LLM_MODEL,
128
  messages=messages,