adam573 commited on
Commit
ac62f87
·
verified ·
1 Parent(s): f0cd91b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -39,7 +39,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
39
 
40
 
41
  final_answer = FinalAnswerTool()
42
- research_tool = DuckTool()
43
 
44
  # 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:
45
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
@@ -54,14 +54,16 @@ custom_role_conversions=None,
54
 
55
 
56
  # Import tool from Hub
57
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
 
58
 
59
  with open("prompts.yaml", 'r') as stream:
60
  prompt_templates = yaml.safe_load(stream)
61
 
62
  agent = CodeAgent(
63
  model=model,
64
- tools=[DuckDuckGoSearchTool(), image_generation_tool, final_answer], ## add your tools here (don't remove final answer)
65
  max_steps=6,
66
  verbosity_level=1,
67
  grammar=None,
 
39
 
40
 
41
  final_answer = FinalAnswerTool()
42
+ research_tool = DuckDuckGoSearchTool()
43
 
44
  # 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:
45
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
 
54
 
55
 
56
  # Import tool from Hub
57
+ #image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
58
+ image_generation_tool = load_model("models/ZB-Tech/Text-to-Image")
59
+ # provider="hf-inference",
60
 
61
  with open("prompts.yaml", 'r') as stream:
62
  prompt_templates = yaml.safe_load(stream)
63
 
64
  agent = CodeAgent(
65
  model=model,
66
+ tools=[research_tool, image_generation_tool, final_answer], ## add your tools here (don't remove final answer)
67
  max_steps=6,
68
  verbosity_level=1,
69
  grammar=None,