Janeka commited on
Commit
71b4f1b
·
verified ·
1 Parent(s): fc5d884

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -24,8 +24,9 @@ def perfect_remove_bg(img):
24
  footprint=np.ones((3,3), np.uint8)
25
  )
26
 
27
- # U²Net for confidence areas (FIXED PARENTHESES)
28
- u2net_mask = np.array(remove(img, session=u2net_session).split()[-1]
 
29
 
30
  # Combine masks
31
  final_mask = np.where(u2net_mask > 200, mask, u2net_mask)
 
24
  footprint=np.ones((3,3), np.uint8)
25
  )
26
 
27
+ # U²Net mask (FIXED - now has all parentheses closed)
28
+ u2net_result = remove(img, session=u2net_session)
29
+ u2net_mask = np.array(u2net_result.split()[-1])
30
 
31
  # Combine masks
32
  final_mask = np.where(u2net_mask > 200, mask, u2net_mask)