Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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):
|