manasajanj commited on
Commit
3fcdea4
·
verified ·
1 Parent(s): 1cfdee1

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
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
39
 
40
  @tool
41
- def generate_image(args):
42
  """A tool that generate the image based on text prompt.
43
  Args:
44
- args: A dictionary containing:
45
- - prompt(str): The text description used to generate the image.
46
  """
47
  try:
48
- prompt = args["prompt"]
49
  image = image_generation_tool(prompt)
50
  return {"image":image}
51
  except Exception as e:
 
38
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
39
 
40
  @tool
41
+ def generate_image(prompt:str)-> dict:
42
  """A tool that generate the image based on text prompt.
43
  Args:
44
+ prompt: The text description used to generate the image.
 
45
  """
46
  try:
 
47
  image = image_generation_tool(prompt)
48
  return {"image":image}
49
  except Exception as e: