veronhii commited on
Commit
912923f
·
1 Parent(s): 23ec869

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -22,7 +22,8 @@ def predict_fn(img):
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")
 
22
  x = np.expand_dims(x, axis=0)
23
  temp = model.predict(x)
24
 
25
+ class_index = np.argmax(temp)
26
+ return CLASS_LABEL[class_index]
27
 
28
 
29
  model = tf.keras.models.load_model("model.h5")