title: how to if statement a model.predict array
body: <p>The model.predict output is either [[1.0.0.]], [[0.1.0.]], [[0.0.1.]] depending on the category of the image. currently struggling to get the category name as output instead such as squat, bench or deadlift and wondering the best way to do this.</p>
  <pre><code>model = load_model('imageModel.h5')
  img_width, img_height = 150, 150
  img = image.load_img('PATH', target_size=(img_width, img_height))
  img = image.img_to_array(img)
  img = np.expand_dims(img, axis=0)
  (model.predict(img))
  print(model.predict(img))
  </code></pre>
  <p>I tried using for statement however this printed out all 3 categories instead of just the category the image is classified in:</p>
  <pre><code>array = np.array(model.predict(img))
  arr1 = [[1, 0, 0]]
  arr2 = [[0, 1, 0]]
  arr3 = [[0, 0, 1]]
  for arr1 in array == True:
     print(&quot;bench&quot;)
  for arr2 in array == True:
  print(&quot;deadlift&quot;)
  for arr3 in array == True:
  print(&quot;squat&quot;)
  </code></pre>
  <p>Any help would be greatly appreciated.</p>