not-lain commited on
Commit
0f755e3
·
1 Parent(s): aaf974f

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (1) hide show
  1. app.py +9 -10
app.py CHANGED
@@ -55,8 +55,10 @@ async def on_ready():
55
  event.set()
56
 
57
 
58
-
59
- @bot.slash_command(name='ping',description='ping')
 
 
60
  async def ping(ctx):
61
  await ctx.respond(f"{bot.latency*1000:.0f}ms")
62
 
@@ -147,14 +149,11 @@ def run_dffusion(pos_prompt: str,neg_promt: str = "",img_url= "",model="absolute
147
 
148
 
149
  # AI prediction command
150
- @bot.slash_command(name='diffusion',description='AI command to generate images')
151
- async def diffusion(ctx,
152
- pos_prompt: discord.option(discord.SlashCommandOptionType.string,description="The positive prompt for the image generation."),
153
- neg_promt: discord.option(discord.SlashCommandOptionType.string, description="The negative prompt for the image generation.", default=""),
154
- img_url : discord.option(discord.SlashCommandOptionType.string, description="The input image for the image generation.", default=""),
155
- improve : discord.option(discord.SlashCommandOptionType.string,choices = ["True","False"], description="Improve the results", default="False"),
156
- model : discord.option(discord.SlashCommandOptionType.string,choices = models, description="The model to use", default="absolutereality_v181.safetensors [3d9d4d2b]")
157
- ):
158
  """
159
  AI command to generate images
160
  """
 
55
  event.set()
56
 
57
 
58
+ @bot.hybrid_command(
59
+ name="ping",
60
+ description="ping"
61
+ )
62
  async def ping(ctx):
63
  await ctx.respond(f"{bot.latency*1000:.0f}ms")
64
 
 
149
 
150
 
151
  # AI prediction command
152
+ @bot.hybrid_command(
153
+ name="diffusion",
154
+ description="creates an AI generated image"
155
+ )
156
+ async def diffusion(ctx, pos_prompt: str="",neg_promt: str = "", img_url= None,improve : Literal["True","False"] = "True",model : models = "absolutereality_v181.safetensors [3d9d4d2b]"):
 
 
 
157
  """
158
  AI command to generate images
159
  """