DTStudios commited on
Commit
d829467
·
verified ·
1 Parent(s): ca8110f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -68,6 +68,7 @@ with open("prompts.yaml", 'r') as stream:
68
  tool=[
69
  DuckDuckGoSearchTool,
70
  get_current_time_in_timezone,
 
71
  load_tool("agents-course/text-to-image", trust_remote_code=True),
72
  ]
73
 
@@ -76,7 +77,11 @@ model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
76
  max_tokens=2048,
77
  temperature=0.5
78
  )
 
 
 
79
  # --- Agent setup ---
 
80
  agent = CodeAgent(
81
  tools=tool,
82
  model= model,
@@ -85,7 +90,12 @@ agent = CodeAgent(
85
  description="Agent with web search and time lookup tools"
86
  )
87
 
 
 
 
 
88
  if __name__ == "__main__":
89
  # Example run
90
  print(agent.run("Search for the latest AI news"))
 
91
  GradioUI(agent).launch()
 
68
  tool=[
69
  DuckDuckGoSearchTool,
70
  get_current_time_in_timezone,
71
+ FinalAnswerTool()
72
  load_tool("agents-course/text-to-image", trust_remote_code=True),
73
  ]
74
 
 
77
  max_tokens=2048,
78
  temperature=0.5
79
  )
80
+ with open("prompts.yaml", "r") as stream:
81
+ prompt_templates = yaml.safe_load(stream)
82
+
83
  # --- Agent setup ---
84
+
85
  agent = CodeAgent(
86
  tools=tool,
87
  model= model,
 
90
  description="Agent with web search and time lookup tools"
91
  )
92
 
93
+
94
+ # Entry Point
95
+
96
+
97
  if __name__ == "__main__":
98
  # Example run
99
  print(agent.run("Search for the latest AI news"))
100
+ from Gradio_UI import GradioUI
101
  GradioUI(agent).launch()