lunarflu HF Staff commited on
Commit
f58bc10
Β·
1 Parent(s): 1a995d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import discord
2
- import os
3
  import threading
4
  import gradio as gr
5
  import requests
@@ -69,11 +69,10 @@ async def commands(ctx):
69
  print(f"Error: unable to help :(")
70
  #---------------------------------------------------------------------------------------------------------------------------------------------
71
  async def safetychecks(ctx):
 
 
 
72
  try:
73
- emoji_guild = ctx.guild
74
- failure_emoji_id = 1098628957521313892
75
- failure_emoji = discord.utils.get(emoji_guild.emojis, id=failure_emoji_id)
76
-
77
  if ctx.author.bot:
78
  print(f"Error: The bot is not allowed to use its own commands.")
79
  await ctx.message.add_reaction(failure_emoji)
@@ -126,7 +125,7 @@ async def safetychecks(ctx):
126
  except Exception as e:
127
  print(f"Error: safetychecks failed somewhere, command will not continue.")
128
  await ctx.message.reply(f"❌ <@811235357663297546> SC failed somewhere ❌") # this will always ping, as long as the bot has access to the channel
129
- await ctx.message.add_reaction('❌')
130
  #----------------------------------------------------------------------------------------------------------------------------------------------
131
  @bot.command()
132
  async def deepfloydifdemo(ctx):
@@ -309,7 +308,7 @@ async def deepfloydif(ctx, *, prompt: str):
309
  custom_timesteps_1 = 'smart50'
310
  number_of_inference_steps = 50
311
  api_name = '/generate64'
312
-
313
  await thread.send(f'{ctx.author.mention}Generating images in thread, can take ~1 minute...')
314
 
315
  except Exception as e:
 
1
  import discord
2
+ import os
3
  import threading
4
  import gradio as gr
5
  import requests
 
69
  print(f"Error: unable to help :(")
70
  #---------------------------------------------------------------------------------------------------------------------------------------------
71
  async def safetychecks(ctx):
72
+ emoji_guild = ctx.guild
73
+ failure_emoji_id = 1098628957521313892
74
+ failure_emoji = discord.utils.get(emoji_guild.emojis, id=failure_emoji_id)
75
  try:
 
 
 
 
76
  if ctx.author.bot:
77
  print(f"Error: The bot is not allowed to use its own commands.")
78
  await ctx.message.add_reaction(failure_emoji)
 
125
  except Exception as e:
126
  print(f"Error: safetychecks failed somewhere, command will not continue.")
127
  await ctx.message.reply(f"❌ <@811235357663297546> SC failed somewhere ❌") # this will always ping, as long as the bot has access to the channel
128
+ await ctx.message.add_reaction(failure_emoji)
129
  #----------------------------------------------------------------------------------------------------------------------------------------------
130
  @bot.command()
131
  async def deepfloydifdemo(ctx):
 
308
  custom_timesteps_1 = 'smart50'
309
  number_of_inference_steps = 50
310
  api_name = '/generate64'
311
+ awdadaw
312
  await thread.send(f'{ctx.author.mention}Generating images in thread, can take ~1 minute...')
313
 
314
  except Exception as e: