Duibonduil commited on
Commit
5f681bc
·
verified ·
1 Parent(s): 553c76c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -24,7 +24,14 @@ class BasicAgent:
24
  def __call__(self, question: str) -> str:
25
  print(f"Agent received question (first 50 chars): {question[:50]}...")
26
  fixed_answer = "This is a default answer."
27
- print(f"Agent returning fixed answer: {fixed_answer}")
 
 
 
 
 
 
 
28
  return fixed_answer
29
 
30
  def run_and_submit_all( profile: gr.OAuthProfile | None):
 
24
  def __call__(self, question: str) -> str:
25
  print(f"Agent received question (first 50 chars): {question[:50]}...")
26
  fixed_answer = "This is a default answer."
27
+
28
+ model = InferenceClientModel()
29
+ agent = CodeAgent(tools=[WebSearchTool()], model=model, stream_outputs=True)
30
+ custom_answer = agent.run("How many seconds would it take for a leopard at full speed to run through Pont des Arts?")
31
+
32
+ print(f"Agent returning fixed answer: {custom_answer}")
33
+
34
+
35
  return fixed_answer
36
 
37
  def run_and_submit_all( profile: gr.OAuthProfile | None):