matjesg commited on
Commit
9365e4c
·
1 Parent(s): b0b955c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -11,8 +11,9 @@ def inference(repo_id, model_name, img):
11
  # Remove redundant channels
12
  img = img[...,:n_channels]
13
  inp = torch.from_numpy(img).float()
14
-
15
- argmax, softmax, stdeviation = model(inp)
 
16
 
17
  return argmax*255, stdeviation
18
 
 
11
  # Remove redundant channels
12
  img = img[...,:n_channels]
13
  inp = torch.from_numpy(img).float()
14
+
15
+ with torch.inference_mode():
16
+ argmax, softmax, stdeviation = model(inp)
17
 
18
  return argmax*255, stdeviation
19