fffiloni commited on
Commit
df5d50c
·
1 Parent(s): 2a50a23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -276,7 +276,7 @@ def run_grounded_sam(input_image, text_prompt, task_type, background_prompt, bg_
276
  else:
277
  if bg_already is False:
278
  background_img = generator(background_prompt).images[0]
279
- else:
280
  background_img = np.array(background_img)
281
  background_img = cv2.resize(background_img, (image_ori.shape[1], image_ori.shape[0]))
282
  com_img = alpha_pred[..., None] * image_ori + (1 - alpha_pred[..., None]) * np.uint8(background_img)
 
276
  else:
277
  if bg_already is False:
278
  background_img = generator(background_prompt).images[0]
279
+
280
  background_img = np.array(background_img)
281
  background_img = cv2.resize(background_img, (image_ori.shape[1], image_ori.shape[0]))
282
  com_img = alpha_pred[..., None] * image_ori + (1 - alpha_pred[..., None]) * np.uint8(background_img)