Chris4K commited on
Commit
3213baa
·
verified ·
1 Parent(s): 980fdf2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -169,17 +169,7 @@ def main():
169
  prompt_templates=prompt_templates,
170
  )
171
 
172
- # Add hooks for better monitoring (available in smolagents)
173
- @agent.add_hook("before_step")
174
- def log_step(agent, step_number):
175
- logger.info(f"Starting step {step_number}/{agent.max_steps}")
176
-
177
- @agent.add_hook("after_step")
178
- def analyze_step(agent, step_number, thought, code, observation):
179
- logger.info(f"Completed step {step_number}")
180
- if "error" in observation.lower():
181
- logger.warning(f"Potential error in step {step_number}: {observation[:100]}...")
182
-
183
  # Launch the Gradio UI with configured settings
184
  try:
185
  GradioUI(agent).launch(
 
169
  prompt_templates=prompt_templates,
170
  )
171
 
172
+
 
 
 
 
 
 
 
 
 
 
173
  # Launch the Gradio UI with configured settings
174
  try:
175
  GradioUI(agent).launch(