Spaces:
Runtime error
Runtime error
Update label.py
Browse files
label.py
CHANGED
|
@@ -99,7 +99,7 @@ def load_model():
|
|
| 99 |
return model
|
| 100 |
|
| 101 |
|
| 102 |
-
def predict_environment(
|
| 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
|