Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ def predict(image):
|
|
29 |
with torch.no_grad():
|
30 |
pred = model(img)
|
31 |
mask = pred.squeeze(0).squeeze(0).cpu().numpy()
|
32 |
-
mask = (mask
|
33 |
return Image.fromarray(mask)
|
34 |
|
35 |
# Gradio interface
|
|
|
29 |
with torch.no_grad():
|
30 |
pred = model(img)
|
31 |
mask = pred.squeeze(0).squeeze(0).cpu().numpy()
|
32 |
+
mask = (mask * 255).astype(np.uint8) # keep gray levels
|
33 |
return Image.fromarray(mask)
|
34 |
|
35 |
# Gradio interface
|