lunarflu HF Staff commited on
Commit
ba577dd
·
1 Parent(s): da77733
Files changed (1) hide show
  1. app.py +13 -9
app.py CHANGED
@@ -101,17 +101,21 @@ async def deepfloydif(ctx, *, prompt: str):
101
 
102
  reaction, user = await bot.wait_for('reaction_add', check=check_reaction)
103
  if str(reaction.emoji) == '1️⃣':
104
- await ctx.send("You chose the first image!")
105
- await dfif2(ctx, 0, stage_1_result_path)
 
106
  elif str(reaction.emoji) == '2️⃣':
107
- await ctx.send("You chose the second image!")
108
- await dfif2(ctx, 1, stage_1_result_path)
 
109
  elif str(reaction.emoji) == '3️⃣':
110
- await ctx.send("You chose the third image!")
111
- await dfif2(ctx, 2, stage_1_result_path)
 
112
  elif str(reaction.emoji) == '4️⃣':
113
- await ctx.send("You chose the fourth image!")
114
- await dfif2(ctx, 3, stage_1_result_path)
 
115
 
116
  #deepfloydif try/except
117
  except Exception as e:
@@ -120,7 +124,7 @@ async def deepfloydif(ctx, *, prompt: str):
120
 
121
  #----------------------------------------------------------------------------------------------------------------------------
122
  # Stage 2
123
- async def dfif2(ctx, index, stage_1_result_path):
124
  try:
125
  selected_index_for_stage_2 = index
126
  seed_2 = 0
 
101
 
102
  reaction, user = await bot.wait_for('reaction_add', check=check_reaction)
103
  if str(reaction.emoji) == '1️⃣':
104
+ ctx.send("You chose the first image!")
105
+ index = 0
106
+ await dfif2(ctx, index, stage_1_result_path)
107
  elif str(reaction.emoji) == '2️⃣':
108
+ ctx.send("You chose the second image!")
109
+ index = 1
110
+ await dfif2(ctx, index, stage_1_result_path)
111
  elif str(reaction.emoji) == '3️⃣':
112
+ ctx.send("You chose the third image!")
113
+ index = 2
114
+ await dfif2(ctx, index, stage_1_result_path)
115
  elif str(reaction.emoji) == '4️⃣':
116
+ ctx.send("You chose the fourth image!")
117
+ index = 3
118
+ await dfif2(ctx, index, stage_1_result_path)
119
 
120
  #deepfloydif try/except
121
  except Exception as e:
 
124
 
125
  #----------------------------------------------------------------------------------------------------------------------------
126
  # Stage 2
127
+ async def dfif2(ctx, index: int, stage_1_result_path):
128
  try:
129
  selected_index_for_stage_2 = index
130
  seed_2 = 0