csiadat commited on
Commit
c284c55
·
verified ·
1 Parent(s): 8cc56b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -17,7 +17,11 @@ 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 = load_tool("agents-course/text-to-image", trust_remote_code=True)
 
 
 
 
21
  prompt = "A high-resolution image of a valentine's day card themed around " + theme
22
  image = image_generation_tool(prompt)
23
  return final_answer(image)
 
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 = "A high-resolution image of a valentine's day card themed around " + theme
26
  image = image_generation_tool(prompt)
27
  return final_answer(image)