matjesg commited on
Commit
7a7d946
1 Parent(s): 95eedf0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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
- return pred*255, std
 
 
 
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"