lunarflu HF Staff commited on
Commit
9dad23e
·
1 Parent(s): bc12f7c

thread test

Browse files
Files changed (1) hide show
  1. app.py +20 -1
app.py CHANGED
@@ -93,9 +93,28 @@ async def deepfloydif(ctx, *, prompt: str):
93
  # Trigger the second stage prediction
94
  #await dfif2(ctx, stage_1_result_path)
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  with open(combined_image_path, 'rb') as f:
97
- sent_message = await ctx.reply('Here is the combined image. React with the image number you want to upscale!', file=discord.File(f, 'combined_image.png'))
 
 
 
98
 
 
99
  # bot reacts with appropriate emojis to the post, both showing the user what options they have,
100
  # as well as showing which post to react to.
101
  for emoji in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']:
 
93
  # Trigger the second stage prediction
94
  #await dfif2(ctx, stage_1_result_path)
95
 
96
+
97
+ tmsg = await ctx.reply('Image will be in the thread')
98
+
99
+ # public thread
100
+ thread = await tmsg_message.create_public_thread(name='Upscale Thread', auto_archive_duration=60) # Adjust the thread settings as needed
101
+
102
+ timg = await thread('Here is the combined image. React with the image number you want to upscale!', file=discord.File(f, 'combined_image.png'))
103
+
104
+ # Add a reaction to the sent message to visually indicate the thread
105
+ await sent_message.add_reaction('🔗')
106
+
107
+
108
+
109
+
110
+ '''
111
  with open(combined_image_path, 'rb') as f:
112
+ sent_message = await ctx.reply('Here is the combined image. React with the image number you want to upscale!', file=discord.File(f, 'combined_image.png'))
113
+
114
+ '''
115
+
116
 
117
+
118
  # bot reacts with appropriate emojis to the post, both showing the user what options they have,
119
  # as well as showing which post to react to.
120
  for emoji in ['1️⃣', '2️⃣', '3️⃣', '4️⃣']: