hardknee commited on
Commit
cb10a37
·
verified ·
1 Parent(s): c201486

Update app.py

Browse files

Trying to get generate_image working

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,14 +52,14 @@ def get_current_time_in_timezone(timezone: str) -> str:
52
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
53
 
54
  @tool
55
- def generate_image(description: str) -> Image:
56
  """A tool that generates an image from a text description.
57
  Args:
58
  description: A string representing the text description to generate an image of.
59
  """
60
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
61
  image = image_generation_tool(description)
62
- return image
63
 
64
 
65
 
 
52
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
53
 
54
  @tool
55
+ def generate_image(description: str) -> str:
56
  """A tool that generates an image from a text description.
57
  Args:
58
  description: A string representing the text description to generate an image of.
59
  """
60
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
61
  image = image_generation_tool(description)
62
+ return f"Image generated for prompt: {description}."
63
 
64
 
65