roger33303 commited on
Commit
9499a48
·
verified ·
1 Parent(s): 2046d74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -32,12 +32,11 @@ def get_current_time_in_timezone(timezone: str) -> str:
32
  except Exception as e:
33
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
34
 
 
35
  # Import tool from Hub
36
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
37
 
38
 
39
-
40
-
41
  final_answer = FinalAnswerTool()
42
 
43
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
@@ -58,7 +57,7 @@ with open("prompts.yaml", 'r') as stream:
58
 
59
  agent = CodeAgent(
60
  model=model,
61
- tools=[final_answer,get_current_time_in_timezone,image_generation_tool(),web_search_tool], ## add your tools here (don't remove final answer)
62
  max_steps=6,
63
  verbosity_level=1,
64
  grammar=None,
 
32
  except Exception as e:
33
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
34
 
35
+
36
  # Import tool from Hub
37
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
38
 
39
 
 
 
40
  final_answer = FinalAnswerTool()
41
 
42
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
 
57
 
58
  agent = CodeAgent(
59
  model=model,
60
+ tools=[final_answer,get_current_time_in_timezone,image_generation_tool,web_search_tool], ## add your tools here (don't remove final answer)
61
  max_steps=6,
62
  verbosity_level=1,
63
  grammar=None,