M2LabOrg commited on
Commit
f0fcaa8
·
verified ·
1 Parent(s): f45da72

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -38,14 +38,12 @@ def get_current_time_in_timezone(timezone: str) -> str:
38
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
39
 
40
  @tool
41
- def generate_image(prompt:str, num_images: int=1, size: str="512x512") -> list:
42
  """Generate image(s) from a text prompt via HF text-to-image.
43
  Args:
44
  prompt: description of the image
45
- num_images: how many to produce
46
- size: image resolution (e.g. "512x512")
47
  """
48
- return image_generation_tool(prompt=prompt, num_images=num_images, size=size)
49
 
50
  @tool
51
  def duckduckgo_search(query: str, max_results: int=5) -> str:
 
38
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
39
 
40
  @tool
41
+ def generate_image(prompt:str) -> list:
42
  """Generate image(s) from a text prompt via HF text-to-image.
43
  Args:
44
  prompt: description of the image
 
 
45
  """
46
+ return image_generation_tool(prompt)
47
 
48
  @tool
49
  def duckduckgo_search(query: str, max_results: int=5) -> str: