Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -21,12 +21,8 @@ def predict_fn(img):
|
|
21 |
x = np.array(img_data)
|
22 |
x = np.expand_dims(x, axis=0)
|
23 |
temp = model.predict(x)
|
24 |
-
|
25 |
-
idx = np.argsort(np.squeeze(temp))[::-1]
|
26 |
-
top3_value = np.asarray([temp[0][i]] for i in idx[0:3])
|
27 |
-
top3_idx = idx[0:3]
|
28 |
|
29 |
-
return
|
30 |
|
31 |
|
32 |
model = tf.keras.models.load_model("model.h5")
|
|
|
21 |
x = np.array(img_data)
|
22 |
x = np.expand_dims(x, axis=0)
|
23 |
temp = model.predict(x)
|
|
|
|
|
|
|
|
|
24 |
|
25 |
+
return CLASS_LABEL[temp]
|
26 |
|
27 |
|
28 |
model = tf.keras.models.load_model("model.h5")
|