Spaces:
Sleeping
Sleeping
Updated with 2 tools again
Browse files
app.py
CHANGED
|
@@ -7,10 +7,6 @@ from tools.final_answer import FinalAnswerTool
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
-
|
| 11 |
-
#agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel())
|
| 12 |
-
#agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
|
| 13 |
-
|
| 14 |
# Tool to suggest a menu based on the occasion
|
| 15 |
@tool
|
| 16 |
def suggest_menu(occasion: str) -> str:
|
|
@@ -28,10 +24,12 @@ def suggest_menu(occasion: str) -> str:
|
|
| 28 |
else:
|
| 29 |
return "Custom menu for the butler."
|
| 30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
# Alfred, the butler, preparing the menu for the party
|
| 32 |
agent = CodeAgent(tools=[suggest_menu], model=HfApiModel())
|
| 33 |
-
|
| 34 |
-
# Preparing the menu for the party
|
| 35 |
agent.run("Prepare a formal menu for the party.")
|
| 36 |
|
| 37 |
GradioUI(agent).launch()
|
|
|
|
| 7 |
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# Tool to suggest a menu based on the occasion
|
| 11 |
@tool
|
| 12 |
def suggest_menu(occasion: str) -> str:
|
|
|
|
| 24 |
else:
|
| 25 |
return "Custom menu for the butler."
|
| 26 |
|
| 27 |
+
# Alfred, the butler, preparing the playlist for the party
|
| 28 |
+
agent = CodeAgent(tools=[DuckDuckGoSearchTool()], model=HfApiModel())
|
| 29 |
+
agent.run("Search for the best music recommendations for a party at the Wayne's mansion.")
|
| 30 |
+
|
| 31 |
# Alfred, the butler, preparing the menu for the party
|
| 32 |
agent = CodeAgent(tools=[suggest_menu], model=HfApiModel())
|
|
|
|
|
|
|
| 33 |
agent.run("Prepare a formal menu for the party.")
|
| 34 |
|
| 35 |
GradioUI(agent).launch()
|