csiadat commited on
Commit
19d079f
·
verified ·
1 Parent(s): 9201fe0

Update app.py (#1)

Browse files

- Update app.py (9d934bc15e553b6c6de8cf4cabdeeea65f37b4cb)

Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -25,12 +25,13 @@ def create_new_vday_card_tool(theme:str) -> str: #it's import to specify the ret
25
  description="Generate image from prompt"
26
  )
27
  '''
28
- image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
29
- image = image_generation_tool(f"Valentine's Day card with theme '{theme}'")
30
  return final_answer(image)
31
  except Exception as e:
32
  return f"Error creating card for theme '{theme}': {str(e)}"
33
 
 
 
34
  final_answer = FinalAnswerTool()
35
 
36
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
 
25
  description="Generate image from prompt"
26
  )
27
  '''
28
+ image = image_generation_tool(theme)
 
29
  return final_answer(image)
30
  except Exception as e:
31
  return f"Error creating card for theme '{theme}': {str(e)}"
32
 
33
+ image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
34
+
35
  final_answer = FinalAnswerTool()
36
 
37
  # If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder: