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

fixing magic (again)

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -166,8 +166,8 @@ 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
- index = int(indexpartialpath[0]) # should be 1
170
- index = index - 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,9 +176,7 @@ 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
- stage_1_result_path = fullpath
180
- index = index
181
- await dfif2(index, stage_1_result_path, thread)
182
 
183
 
184
 
 
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
  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