Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,5 @@
|
|
| 1 |
-
from smolagents import CodeAgent,DuckDuckGoSearchTool,
|
| 2 |
-
import datetime
|
| 3 |
-
import requests
|
| 4 |
-
import pytz
|
| 5 |
-
import yaml
|
| 6 |
from tools.final_answer import FinalAnswerTool
|
| 7 |
-
|
| 8 |
from Gradio_UI import GradioUI
|
| 9 |
|
| 10 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
@@ -55,7 +50,10 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 55 |
|
| 56 |
agent = CodeAgent(
|
| 57 |
model=model,
|
| 58 |
-
tools=[final_answer,
|
|
|
|
|
|
|
|
|
|
| 59 |
max_steps=6,
|
| 60 |
verbosity_level=1,
|
| 61 |
grammar=None,
|
|
|
|
| 1 |
+
from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, load_tool
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
from tools.final_answer import FinalAnswerTool
|
|
|
|
| 3 |
from Gradio_UI import GradioUI
|
| 4 |
|
| 5 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
|
|
| 50 |
|
| 51 |
agent = CodeAgent(
|
| 52 |
model=model,
|
| 53 |
+
tools=[final_answer,
|
| 54 |
+
get_current_time_in_timezone,
|
| 55 |
+
DuckDuckGoSearchTool(),
|
| 56 |
+
image_generation_tool], ## add your tools here (don't remove final answer)
|
| 57 |
max_steps=6,
|
| 58 |
verbosity_level=1,
|
| 59 |
grammar=None,
|