csiadat commited on
Commit
b53d16e
·
verified ·
1 Parent(s): a99fa1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -17,11 +17,14 @@ def create_new_vday_card_tool(theme:str) -> str: #it's import to specify the ret
17
  """
18
  try:
19
  # Import tool from Hub
 
20
  image_generation_tool = Tool.from_space(
21
  space_id="black-forest-labs/FLUX.1-schnell",
22
  name="generate-image",
23
  description="Generate image from prompt"
24
  )
 
 
25
  prompt = "Generate a high-resolution image of a valentine's day card themed around " + theme
26
  image = image_generation_tool(prompt)
27
  return final_answer(image)
 
17
  """
18
  try:
19
  # Import tool from Hub
20
+ '''
21
  image_generation_tool = Tool.from_space(
22
  space_id="black-forest-labs/FLUX.1-schnell",
23
  name="generate-image",
24
  description="Generate image from prompt"
25
  )
26
+ '''
27
+ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
28
  prompt = "Generate a high-resolution image of a valentine's day card themed around " + theme
29
  image = image_generation_tool(prompt)
30
  return final_answer(image)