bangadu commited on
Commit
2010a15
·
verified ·
1 Parent(s): e151e77

Fix API key authentication for InferenceClientModel

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -53,8 +53,13 @@ from tools.final_answer import FinalAnswerTool as FinalAnswer
53
 
54
 
55
 
 
 
 
 
56
  model = InferenceClientModel(
57
  model_id='Qwen/Qwen3-Next-80B-A3B-Thinking',
 
58
  )
59
 
60
  web_search = WebSearch()
 
53
 
54
 
55
 
56
+ # Authenticate with Hugging Face using HF_TOKEN from environment
57
+ if hf_token := os.getenv('HF_TOKEN'):
58
+ login(hf_token)
59
+
60
  model = InferenceClientModel(
61
  model_id='Qwen/Qwen3-Next-80B-A3B-Thinking',
62
+ api_key=os.getenv('HF_TOKEN'),
63
  )
64
 
65
  web_search = WebSearch()