Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,6 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 14 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 15 |
class BasicAgent:
|
| 16 |
def __init__(self):
|
| 17 |
-
print("BasicAgent initialized.")
|
| 18 |
agent = CodeAgent(
|
| 19 |
tools=[
|
| 20 |
DuckDuckGoSearchTool(),
|
|
@@ -22,14 +21,10 @@ class BasicAgent:
|
|
| 22 |
FinalAnswerTool()
|
| 23 |
],
|
| 24 |
model=InferenceClientModel(),
|
| 25 |
-
max_steps=10,
|
| 26 |
-
verbosity_level=2
|
| 27 |
)
|
| 28 |
def __call__(self, question: str) -> str:
|
| 29 |
-
"""print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 30 |
-
fixed_answer = "This is a default answer."
|
| 31 |
-
print(f"Agent returning fixed answer: {fixed_answer}")
|
| 32 |
-
return fixed_answer"""
|
| 33 |
return self.agent.run(question)
|
| 34 |
|
| 35 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
|
|
| 14 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 15 |
class BasicAgent:
|
| 16 |
def __init__(self):
|
|
|
|
| 17 |
agent = CodeAgent(
|
| 18 |
tools=[
|
| 19 |
DuckDuckGoSearchTool(),
|
|
|
|
| 21 |
FinalAnswerTool()
|
| 22 |
],
|
| 23 |
model=InferenceClientModel(),
|
| 24 |
+
#max_steps=10,
|
| 25 |
+
#verbosity_level=2
|
| 26 |
)
|
| 27 |
def __call__(self, question: str) -> str:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
return self.agent.run(question)
|
| 29 |
|
| 30 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|