Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,8 +29,6 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
| 29 |
|
| 30 |
final_answer = FinalAnswerTool()
|
| 31 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 32 |
-
|
| 33 |
-
# Set up InferenceClient as the model
|
| 34 |
model = InferenceClient("Qwen/Qwen2.5-Coder-32B-Instruct")
|
| 35 |
|
| 36 |
with open("prompts.yaml", "r") as stream:
|
|
@@ -42,4 +40,16 @@ agent = CodeAgent(
|
|
| 42 |
DuckDuckGoSearchTool(),
|
| 43 |
image_generation_tool,
|
| 44 |
my_custom_tool,
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
final_answer = FinalAnswerTool()
|
| 31 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
|
|
|
|
|
|
| 32 |
model = InferenceClient("Qwen/Qwen2.5-Coder-32B-Instruct")
|
| 33 |
|
| 34 |
with open("prompts.yaml", "r") as stream:
|
|
|
|
| 40 |
DuckDuckGoSearchTool(),
|
| 41 |
image_generation_tool,
|
| 42 |
my_custom_tool,
|
| 43 |
+
get_current_time_in_timezone,
|
| 44 |
+
final_answer
|
| 45 |
+
],
|
| 46 |
+
max_steps=6,
|
| 47 |
+
verbosity_level=1,
|
| 48 |
+
grammar=None,
|
| 49 |
+
planning_interval=None,
|
| 50 |
+
prompt_templates=prompt_templates
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
+
print("🚀 Agent starting...")
|
| 54 |
+
GradioUI(agent).launch()
|
| 55 |
+
print("✅ Gradio launched!")
|