Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
| 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 |
|