Sonu313131 commited on
Commit
ea8d34e
·
verified ·
1 Parent(s): 2ba19e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -30,7 +30,11 @@ class BasicAgent:
30
 
31
  search_tool = DuckDuckGoSearchTool()
32
 
33
- token = os.getenv("apitoken")
 
 
 
 
34
  def run_and_submit_all(profile: gr.OAuthProfile | None):
35
  """
36
  Fetches all questions, runs the BasicAgent on them, submits all answers.
@@ -40,7 +44,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
40
  try:
41
  agent = CodeAgent(
42
  tools=[search_tool],
43
- model=HfApiModel("deepseek-ai/DeepSeek-R1-0528"),
44
  max_steps=5,
45
  verbosity_level=2
46
  )
 
30
 
31
  search_tool = DuckDuckGoSearchTool()
32
 
33
+ from huggingface_hub import login
34
+ import os
35
+
36
+ # Automatically uses secret environment variable
37
+ login(token=os.environ["HUGGINGFACEHUB_API_TOKEN"])
38
  def run_and_submit_all(profile: gr.OAuthProfile | None):
39
  """
40
  Fetches all questions, runs the BasicAgent on them, submits all answers.
 
44
  try:
45
  agent = CodeAgent(
46
  tools=[search_tool],
47
+ model=InferenceClientModel("deepseek-ai/DeepSeek-R1-0528"),
48
  max_steps=5,
49
  verbosity_level=2
50
  )