Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -36,12 +36,13 @@ class BasicAgent:
|
|
36 |
|
37 |
class BasicCodeAgent:
|
38 |
def __init__(self):
|
39 |
-
|
|
|
40 |
print("BasicCodeAgent initialized.")
|
41 |
def __call__(self, question: str) -> str:
|
42 |
print(f"BasicCodeAgent received question (first 50 chars): {question[:50]}...")
|
43 |
fixed_answer = "This is a default answer."
|
44 |
-
answer = agent.run(question)
|
45 |
print(f"BasicCodeAgent returning fixed answer: {fixed_answer}")
|
46 |
return answer
|
47 |
|
|
|
36 |
|
37 |
class BasicCodeAgent:
|
38 |
def __init__(self):
|
39 |
+
model = InferenceClientModel()
|
40 |
+
self.agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=model)
|
41 |
print("BasicCodeAgent initialized.")
|
42 |
def __call__(self, question: str) -> str:
|
43 |
print(f"BasicCodeAgent received question (first 50 chars): {question[:50]}...")
|
44 |
fixed_answer = "This is a default answer."
|
45 |
+
answer = self.agent.run(question)
|
46 |
print(f"BasicCodeAgent returning fixed answer: {fixed_answer}")
|
47 |
return answer
|
48 |
|