wop commited on
Commit
23c4884
·
verified ·
1 Parent(s): bfd36b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -77,14 +77,9 @@ async def ai(ctx, *, input_text: str):
77
  async def img(ctx, *, prompt: str):
78
  """Create an image with description using AI."""
79
  # Your payload for the image generation (modify as needed)
80
- payload = {
81
- "prompt": prompt,
82
- "num_return_sequences": 1
83
- }
84
-
85
- # Query the API to generate the image
86
- image_data = query(payload)
87
-
88
  # Send the image as a file
89
  await ctx.send(file=discord.File(image_data, filename="generated_image.png"))
90
 
 
77
  async def img(ctx, *, prompt: str):
78
  """Create an image with description using AI."""
79
  # Your payload for the image generation (modify as needed)
80
+ async with ctx.typing():
81
+ image_data = query(prompt)
82
+
 
 
 
 
 
83
  # Send the image as a file
84
  await ctx.send(file=discord.File(image_data, filename="generated_image.png"))
85