yaraa11 commited on
Commit
ca09c0e
·
verified ·
1 Parent(s): 52895d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -79,6 +79,7 @@ def predict(img):
79
  tumor_present = pred.max() > 0.7
80
 
81
  if tumor_present:
 
82
  mask = remove_small_blobs(mask, min_size=50)
83
  mask_img = Image.fromarray(mask.squeeze()).convert("L")
84
 
 
79
  tumor_present = pred.max() > 0.7
80
 
81
  if tumor_present:
82
+ mask = (pred > 0.7).astype(np.uint8) * 255
83
  mask = remove_small_blobs(mask, min_size=50)
84
  mask_img = Image.fromarray(mask.squeeze()).convert("L")
85