Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,10 @@ def inference(repo_id, model_name, img):
|
|
18 |
pred = argmax.cpu().numpy()
|
19 |
std = stdeviation.cpu().numpy()
|
20 |
|
21 |
-
|
|
|
|
|
|
|
22 |
|
23 |
|
24 |
title="deepflash2"
|
|
|
18 |
pred = argmax.cpu().numpy()
|
19 |
std = stdeviation.cpu().numpy()
|
20 |
|
21 |
+
# Adjust mask for binary cases
|
22 |
+
if model.num_classes==2: pred *= 255
|
23 |
+
|
24 |
+
return pred, std
|
25 |
|
26 |
|
27 |
title="deepflash2"
|