emroca commited on
Commit
ec88ced
·
verified ·
1 Parent(s): ba9ae63

Update app.py

Browse files

ajustar implementation de generacion de imagen

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,8 +23,8 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
23
  elif arg2 == 2:
24
  # Generate image using image generation tool
25
  prompt = f"Generate an image based on the following input: {arg1}"
26
- image_url = image_generation_tool(prompt)
27
- return f"Image generated: {image_url}"
28
  else:
29
  return "Invalid argument for arg2. Use 1 for text generation and 2 for image generation."
30
 
 
23
  elif arg2 == 2:
24
  # Generate image using image generation tool
25
  prompt = f"Generate an image based on the following input: {arg1}"
26
+ image_response = image_generation_tool(prompt)
27
+ return f"Image generated: {image_response['image_url']}"
28
  else:
29
  return "Invalid argument for arg2. Use 1 for text generation and 2 for image generation."
30