Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,12 +8,12 @@ from tools.final_answer import FinalAnswerTool
|
|
| 8 |
from tools.web_search import DuckDuckGoSearchTool
|
| 9 |
from tools.visit_webpage import VisitWebpageTool
|
| 10 |
from tools.recipe_tools import parse_recipe_ingredients, organize_shopping_list, extract_recipe_info
|
| 11 |
-
|
| 12 |
from Gradio_UI import GradioUI
|
| 13 |
|
| 14 |
# Initialize tools
|
| 15 |
final_answer = FinalAnswerTool()
|
| 16 |
-
|
|
|
|
| 17 |
|
| 18 |
# Initialize model with alternative endpoint
|
| 19 |
model = HfApiModel(
|
|
@@ -31,11 +31,12 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 31 |
agent = CodeAgent(
|
| 32 |
model=model,
|
| 33 |
tools=[
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
|
|
|
| 39 |
],
|
| 40 |
max_steps=6,
|
| 41 |
verbosity_level=1,
|
|
|
|
| 8 |
from tools.web_search import DuckDuckGoSearchTool
|
| 9 |
from tools.visit_webpage import VisitWebpageTool
|
| 10 |
from tools.recipe_tools import parse_recipe_ingredients, organize_shopping_list, extract_recipe_info
|
|
|
|
| 11 |
from Gradio_UI import GradioUI
|
| 12 |
|
| 13 |
# Initialize tools
|
| 14 |
final_answer = FinalAnswerTool()
|
| 15 |
+
search_tool = DuckDuckGoSearchTool()
|
| 16 |
+
webpage_tool = VisitWebpageTool()
|
| 17 |
|
| 18 |
# Initialize model with alternative endpoint
|
| 19 |
model = HfApiModel(
|
|
|
|
| 31 |
agent = CodeAgent(
|
| 32 |
model=model,
|
| 33 |
tools=[
|
| 34 |
+
search_tool,
|
| 35 |
+
webpage_tool,
|
| 36 |
+
parse_recipe_ingredients,
|
| 37 |
+
organize_shopping_list,
|
| 38 |
+
extract_recipe_info,
|
| 39 |
+
final_answer
|
| 40 |
],
|
| 41 |
max_steps=6,
|
| 42 |
verbosity_level=1,
|