Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,7 +5,7 @@ import pytz
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
# Add tool Class by hiroshi
|
| 8 |
-
from tools.visit_webpage import VisitWebpageTool
|
| 9 |
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
|
|
@@ -39,7 +39,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 39 |
final_answer = FinalAnswerTool()
|
| 40 |
# Add tools by hiroshi
|
| 41 |
# web_search = DuckDuckGoSearchTool()
|
| 42 |
-
visit_webpage = VisitWebpageTool()
|
| 43 |
|
| 44 |
|
| 45 |
# 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:
|
|
@@ -61,9 +61,9 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 61 |
|
| 62 |
agent = CodeAgent(
|
| 63 |
model=model,
|
| 64 |
-
|
| 65 |
# tools=[final_answer,get_current_time_in_timezone,web_search,visit_webpage], ## add your tools here (don't remove final answer)
|
| 66 |
-
tools=[final_answer,get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 67 |
# max_steps=6,
|
| 68 |
max_steps=12,
|
| 69 |
verbosity_level=1,
|
|
|
|
| 5 |
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
# Add tool Class by hiroshi
|
| 8 |
+
#from tools.visit_webpage import VisitWebpageTool
|
| 9 |
|
| 10 |
from Gradio_UI import GradioUI
|
| 11 |
|
|
|
|
| 39 |
final_answer = FinalAnswerTool()
|
| 40 |
# Add tools by hiroshi
|
| 41 |
# web_search = DuckDuckGoSearchTool()
|
| 42 |
+
#visit_webpage = VisitWebpageTool()
|
| 43 |
|
| 44 |
|
| 45 |
# 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:
|
|
|
|
| 61 |
|
| 62 |
agent = CodeAgent(
|
| 63 |
model=model,
|
| 64 |
+
tools=[final_answer], ## add your tools here (don't remove final answer)
|
| 65 |
# tools=[final_answer,get_current_time_in_timezone,web_search,visit_webpage], ## add your tools here (don't remove final answer)
|
| 66 |
+
# tools=[final_answer,get_current_time_in_timezone], ## add your tools here (don't remove final answer)
|
| 67 |
# max_steps=6,
|
| 68 |
max_steps=12,
|
| 69 |
verbosity_level=1,
|