la-min commited on
Commit
96e9892
·
verified ·
1 Parent(s): 5a5cd10

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -6,6 +6,12 @@ import yaml
6
  from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
 
 
 
 
 
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
@@ -55,7 +61,6 @@ model = HfApiModel(
55
  max_tokens=2096,
56
  temperature=0.5,
57
  model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
58
- hf_api_key="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",
59
  custom_role_conversions=None,
60
  )
61
 
 
6
  from tools.final_answer import FinalAnswerTool
7
 
8
  from Gradio_UI import GradioUI
9
+ from huggingface_hub import login
10
+ import os
11
+
12
+ hf_api_key = os.getenv("HUGGINGFACEHUB_API_TOKEN")
13
+
14
+ login(hf_api_key)
15
 
16
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
17
  @tool
 
61
  max_tokens=2096,
62
  temperature=0.5,
63
  model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
 
64
  custom_role_conversions=None,
65
  )
66