Rubén Escobedo commited on
Commit
6c792e5
·
1 Parent(s): da9c964

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -25,6 +25,8 @@ def predict(img):
25
  with torch.no_grad():
26
  outputs = model(tensor)
27
 
 
 
28
  mask = np.array(outputs.cpu())
29
  mask[mask == 1] = 255 # grape
30
  mask[mask == 2] = 150 # leaves
 
25
  with torch.no_grad():
26
  outputs = model(tensor)
27
 
28
+ outputs = torch.argmax(outputs,1)
29
+
30
  mask = np.array(outputs.cpu())
31
  mask[mask == 1] = 255 # grape
32
  mask[mask == 2] = 150 # leaves