Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -117,7 +117,7 @@ def run(*args):
117
  ims2 = []
118
  for idx, (b, im1, im2, cond_weight) in enumerate(zip(*inps)):
119
  if idx > 1:
120
- if im1 is not None or im2 is not None:
121
  if im1 is not None:
122
  h, w, _ = im1.shape
123
  else:
@@ -129,10 +129,11 @@ def run(*args):
129
  ims1.append(im1)
130
  ims2.append(im2)
131
  continue
132
- if im1 is not None:
133
- im1 = cv2.resize(im1, (w, h), interpolation=cv2.INTER_CUBIC)
134
- if im2 is not None:
135
- im2 = cv2.resize(im2, (w, h), interpolation=cv2.INTER_CUBIC)
 
136
  ims1.append(im1)
137
  ims2.append(im2)
138
 
 
117
  ims2 = []
118
  for idx, (b, im1, im2, cond_weight) in enumerate(zip(*inps)):
119
  if idx > 1:
120
+ if b != 'Nothing' and (im1 is not None or im2 is not None):
121
  if im1 is not None:
122
  h, w, _ = im1.shape
123
  else:
 
129
  ims1.append(im1)
130
  ims2.append(im2)
131
  continue
132
+ if b != 'Nothing':
133
+ if im1 is not None:
134
+ im1 = cv2.resize(im1, (w, h), interpolation=cv2.INTER_CUBIC)
135
+ if im2 is not None:
136
+ im2 = cv2.resize(im2, (w, h), interpolation=cv2.INTER_CUBIC)
137
  ims1.append(im1)
138
  ims2.append(im2)
139