feat: add translation tool from hub
Browse files
app.py
CHANGED
@@ -63,6 +63,7 @@ custom_role_conversions=None,
|
|
63 |
|
64 |
# Import tool from Hub
|
65 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
|
|
66 |
|
67 |
with open("prompts.yaml", 'r') as stream:
|
68 |
prompt_templates = yaml.safe_load(stream)
|
@@ -75,7 +76,8 @@ agent = CodeAgent(
|
|
75 |
visit_webpage,
|
76 |
get_current_time_in_timezone,
|
77 |
conversational_utterance,
|
78 |
-
image_generation_tool
|
|
|
79 |
],
|
80 |
max_steps=6,
|
81 |
verbosity_level=1,
|
|
|
63 |
|
64 |
# Import tool from Hub
|
65 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
66 |
+
translation_tool = load_tool("translation", trust_remote_code=True) # TranslationTool
|
67 |
|
68 |
with open("prompts.yaml", 'r') as stream:
|
69 |
prompt_templates = yaml.safe_load(stream)
|
|
|
76 |
visit_webpage,
|
77 |
get_current_time_in_timezone,
|
78 |
conversational_utterance,
|
79 |
+
image_generation_tool,
|
80 |
+
translation_tool
|
81 |
],
|
82 |
max_steps=6,
|
83 |
verbosity_level=1,
|