Hakim571 commited on
Commit
9564e61
1 Parent(s): 14b1f9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -12,9 +12,7 @@ model=tf.keras.models.load_model('./my_model')
12
  def import_and_predict(image_data):
13
  x = image_data.reshape((-1, 224, 224, 3))
14
  x /= 255
15
- x=np.expand_dims(x, axis=0)
16
- image = np.vstack([x])
17
- prediction = model.predict(image)
18
  labels=class_names
19
  confidences = {labels[i]: float(prediction[0][i]) for i in range(15)}
20
  return confidences
 
12
  def import_and_predict(image_data):
13
  x = image_data.reshape((-1, 224, 224, 3))
14
  x /= 255
15
+ prediction = model.predict(x)
 
 
16
  labels=class_names
17
  confidences = {labels[i]: float(prediction[0][i]) for i in range(15)}
18
  return confidences