Spaces:
Runtime error
Runtime error
liuyuan-pal
commited on
Commit
•
741df38
1
Parent(s):
826f3e2
update
Browse files
app.py
CHANGED
@@ -97,7 +97,7 @@ def white_background(img):
|
|
97 |
def sam_predict(predictor, raw_im):
|
98 |
raw_im = np.asarray(raw_im)
|
99 |
raw_rgb = white_background(raw_im)
|
100 |
-
h, w = raw_rgb.height,
|
101 |
raw_rgb = add_margin(raw_rgb, color=255, size=max(h, w))
|
102 |
|
103 |
raw_rgb.thumbnail([512, 512], Image.Resampling.LANCZOS)
|
|
|
97 |
def sam_predict(predictor, raw_im):
|
98 |
raw_im = np.asarray(raw_im)
|
99 |
raw_rgb = white_background(raw_im)
|
100 |
+
h, w = raw_rgb.height, raw_rgb.width
|
101 |
raw_rgb = add_margin(raw_rgb, color=255, size=max(h, w))
|
102 |
|
103 |
raw_rgb.thumbnail([512, 512], Image.Resampling.LANCZOS)
|