cowrycode commited on
Commit
174b746
·
verified ·
1 Parent(s): ed6a422

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -24,19 +24,19 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
24
  class BasicAgent:
25
  def __init__(self):
26
  print("BasicAgent initialized. . . .")
27
- self.agent = smart_agent()
28
- # self.api_key = os.getenv("HF_TOKEN")
29
- # self.llm = HuggingFaceInferenceAPI(
30
- # model_name="deepseek-ai/DeepSeek-R1-0528",
31
- # token=self.api_key,
32
- # provider="auto",
33
- # max_iterations=10
34
- # )
35
- # self.agent = AgentWorkflow.from_tools_or_functions(
36
- # [wikipedia_search_tool, youtube_transcript_tool, youtube_transcript_snippet_tool,
37
- # round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool],
38
- # llm=self.llm
39
- # )
40
 
41
  async def run(self, question: str) -> str:
42
  print(f"Agent received question (first 50 chars): {question[:50]}...")
 
24
  class BasicAgent:
25
  def __init__(self):
26
  print("BasicAgent initialized. . . .")
27
+ #self.agent = smart_agent()
28
+ self.api_key = os.getenv("HF_TOKEN")
29
+ self.llm = HuggingFaceInferenceAPI(
30
+ model_name="deepseek-ai/DeepSeek-R1-0528",
31
+ token=self.api_key,
32
+ provider="auto",
33
+ max_iterations=10
34
+ )
35
+ self.agent = AgentWorkflow.from_tools_or_functions(
36
+ [wikipedia_search_tool, youtube_transcript_tool, youtube_transcript_snippet_tool,
37
+ round_to_two_decimals_tool, text_inverter_tool, google_web_search_tool],
38
+ llm=self.llm
39
+ )
40
 
41
  async def run(self, question: str) -> str:
42
  print(f"Agent received question (first 50 chars): {question[:50]}...")