Spaces:
Build error
Build error
harshaUwm163
commited on
Commit
·
8b190a8
1
Parent(s):
40cbb61
testing old label
Browse files
app.py
CHANGED
@@ -48,11 +48,11 @@ def infer(input_image):
|
|
48 |
print(image_tensor.shape)
|
49 |
predictions = model.predict(np.expand_dims((image_tensor), axis=0))
|
50 |
predictions = np.squeeze(predictions)
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
|
55 |
-
return dict(zip(class_names, predictions))
|
56 |
|
57 |
|
58 |
# get the inputs
|
|
|
48 |
print(image_tensor.shape)
|
49 |
predictions = model.predict(np.expand_dims((image_tensor), axis=0))
|
50 |
predictions = np.squeeze(predictions)
|
51 |
+
predictions = np.argmax(predictions) # , axis=2
|
52 |
+
predicted_label = class_names[predictions.item()]
|
53 |
+
return str(predicted_label)
|
54 |
|
55 |
+
# return dict(zip(class_names, predictions))
|
56 |
|
57 |
|
58 |
# get the inputs
|