jaimin commited on
Commit
71868b5
·
1 Parent(s): 253ce19

Update label.py

Browse files
Files changed (1) hide show
  1. label.py +2 -2
label.py CHANGED
@@ -99,7 +99,7 @@ def load_model():
99
  return model
100
 
101
 
102
- def predict_environment(image):
103
  # load the labels
104
  classes, labels_IO, labels_attribute, W_attribute = load_labels()
105
 
@@ -115,7 +115,7 @@ def predict_environment(image):
115
  weight_softmax = params[-2].data.numpy()
116
  weight_softmax[weight_softmax<0] = 0
117
 
118
- img = Image.open(image)
119
  input_img = V(tf(img).unsqueeze(0))
120
 
121
  # forward pass
 
99
  return model
100
 
101
 
102
+ def predict_environment(img):
103
  # load the labels
104
  classes, labels_IO, labels_attribute, W_attribute = load_labels()
105
 
 
115
  weight_softmax = params[-2].data.numpy()
116
  weight_softmax[weight_softmax<0] = 0
117
 
118
+ #img = Image.open(image)
119
  input_img = V(tf(img).unsqueeze(0))
120
 
121
  # forward pass