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 |
-
# Prediction
|
46 |
with torch.no_grad():
|
47 |
preds = birefnet(input_images)[-1].sigmoid().cpu()
|
48 |
pred = preds[0].squeeze()
|
@@ -364,10 +364,10 @@ if __name__ == "__main__":
|
|
364 |
),
|
365 |
],
|
366 |
examples=[
|
367 |
-
["./examples/Test20.jpg", 2
|
368 |
-
["./examples/Test21.jpg", 2
|
369 |
-
["./examples/Test22.jpg", 2
|
370 |
-
["./examples/Test23.jpg", 2
|
371 |
],
|
372 |
)
|
373 |
ifer.launch(share=True)
|
|
|
42 |
image = Image.fromarray(image)
|
43 |
input_images = transform_image(image).unsqueeze(0).to("cpu")
|
44 |
|
45 |
+
, "en" # Prediction
|
46 |
with torch.no_grad():
|
47 |
preds = birefnet(input_images)[-1].sigmoid().cpu()
|
48 |
pred = preds[0].squeeze()
|
|
|
364 |
),
|
365 |
],
|
366 |
examples=[
|
367 |
+
["./examples/Test20.jpg", 2],
|
368 |
+
["./examples/Test21.jpg", 2],
|
369 |
+
["./examples/Test22.jpg", 2],
|
370 |
+
["./examples/Test23.jpg", 2],
|
371 |
],
|
372 |
)
|
373 |
ifer.launch(share=True)
|