ho11laqe commited on
Commit
ae3b431
1 Parent(s): 5d00928

add background to output

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -35,10 +35,7 @@ def run_front_detection(input_img):
35
  image_rgb = image_gray.convert('RGB')
36
  np_array = np.asarray(image_rgb).copy()
37
 
38
- # Modify the NumPy array (e.g. change pixel values)
39
- # Example: multiply all pixel values by 2
40
-
41
- np_array[front==1,0]= 255
42
 
43
  # Convert NumPy array back to PIL image
44
  pil_image_modified = Image.fromarray(np_array)
 
35
  image_rgb = image_gray.convert('RGB')
36
  np_array = np.asarray(image_rgb).copy()
37
 
38
+ np_array[np.array(front)==255,0] = 255
 
 
 
39
 
40
  # Convert NumPy array back to PIL image
41
  pil_image_modified = Image.fromarray(np_array)