lunarflu HF Staff commited on
Commit
7fb81a9
Β·
1 Parent(s): 156cfc5

revert magic

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -166,8 +166,7 @@ async def on_reaction_add(reaction, user):
166
  # remove .png first
167
  indexpartialpath = image_name[:-4] # should be 1tmpgtv4qjix
168
  # extract index as an integer (dfif2 needs integer)
169
- imageindex = int(indexpartialpath[0]) # should be 1
170
- imageindex = imageindex - 1 # since we were taking index from "images 1 - 4"
171
  # extract partialpath
172
  partialpath = indexpartialpath[1:] # should be tmpgtv4qjix
173
  # add /tmp/ to partialpath, save as new variable
@@ -176,7 +175,9 @@ async def on_reaction_add(reaction, user):
176
  if emoji == 'πŸ‘':
177
  if reaction.message.attachments:
178
  if user.id == reaction.message.mentions[0].id: # all we care about is upscaling whatever image this is
179
- await dfif2(imageindex, fullpath, thread)
 
 
180
 
181
 
182
 
 
166
  # remove .png first
167
  indexpartialpath = image_name[:-4] # should be 1tmpgtv4qjix
168
  # extract index as an integer (dfif2 needs integer)
169
+ index = int(indexpartialpath[0]) # should be 1
 
170
  # extract partialpath
171
  partialpath = indexpartialpath[1:] # should be tmpgtv4qjix
172
  # add /tmp/ to partialpath, save as new variable
 
175
  if emoji == 'πŸ‘':
176
  if reaction.message.attachments:
177
  if user.id == reaction.message.mentions[0].id: # all we care about is upscaling whatever image this is
178
+ stage_1_result_path = fullpath
179
+ index = index
180
+ await dfif2(index, stage_1_result_path, thread)
181
 
182
 
183