Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def remove_bg(image: np.ndarray) -> np.ndarray:
|
|
42 |
image = Image.fromarray(image)
|
43 |
input_images = transform_image(image).unsqueeze(0).to("cpu")
|
44 |
|
45 |
-
|
46 |
with torch.no_grad():
|
47 |
preds = birefnet(input_images)[-1].sigmoid().cpu()
|
48 |
pred = preds[0].squeeze()
|
|
|
42 |
image = Image.fromarray(image)
|
43 |
input_images = transform_image(image).unsqueeze(0).to("cpu")
|
44 |
|
45 |
+
# Prediction
|
46 |
with torch.no_grad():
|
47 |
preds = birefnet(input_images)[-1].sigmoid().cpu()
|
48 |
pred = preds[0].squeeze()
|