Spaces:
Runtime error
Runtime error
without visiting pages
Browse files
app.py
CHANGED
|
@@ -45,8 +45,6 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 45 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 46 |
|
| 47 |
|
| 48 |
-
web_search = DuckDuckGoSearchTool(max_results=5)
|
| 49 |
-
visit_webpage = VisitWebpageTool(max_output_length=5000)
|
| 50 |
final_answer = FinalAnswerTool()
|
| 51 |
|
| 52 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
|
@@ -70,8 +68,8 @@ agent = CodeAgent(
|
|
| 70 |
model=model,
|
| 71 |
tools=[
|
| 72 |
final_answer,
|
| 73 |
-
|
| 74 |
-
|
| 75 |
], ## add your tools here (don't remove final answer)
|
| 76 |
max_steps=6,
|
| 77 |
verbosity_level=1,
|
|
@@ -84,4 +82,3 @@ agent = CodeAgent(
|
|
| 84 |
|
| 85 |
|
| 86 |
GradioUI(agent).launch()
|
| 87 |
-
|
|
|
|
| 45 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
| 46 |
|
| 47 |
|
|
|
|
|
|
|
| 48 |
final_answer = FinalAnswerTool()
|
| 49 |
|
| 50 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
|
|
|
| 68 |
model=model,
|
| 69 |
tools=[
|
| 70 |
final_answer,
|
| 71 |
+
DuckDuckGoSearchTool(max_results=5),
|
| 72 |
+
# VisitWebpageTool(max_output_length=5000)
|
| 73 |
], ## add your tools here (don't remove final answer)
|
| 74 |
max_steps=6,
|
| 75 |
verbosity_level=1,
|
|
|
|
| 82 |
|
| 83 |
|
| 84 |
GradioUI(agent).launch()
|
|
|