title: What is this error "AttributeError: 'numpy.ndarray' object has no attribute 'load_img'"?
body: <p>This is a test function that I have implemented to test POST API call. 
  I have added an array with image links that I need loop though.</p>
  
  <pre><code>import requests
  import json
  from keras.preprocessing.image import img_to_array, array_to_img
  from keras.preprocessing import image
  
  flowers = ['c:/flower_photos/daisy/107592979_aaa9cdfe78_m.jpg', 'c:flower_photos/daisy/134409839_71069a95d1_m.jpg', 'c:/flower_photos/daisy/144099102_bf63a41e4f_n.jpg','c:/flower_photos/daisy/154332674_453cea64f4.jpg']
  for x in flowers:
      image = img_to_array(image.load_img(x, target_size=(128,128))) / 255
      payload = {
        "signature_name": "" ,
        "instances": [{'image': image.tolist()}]
      }
      print("sending request...")
      r = requests.post('http://localhost:8501/v1/models/flowers/versions/1:predict', json=payload)
      print(r.content)
  </code></pre>
  
  <p>The first iteration works fine but then it fails with error "AttributeError: 'numpy.ndarray' object has no attribute 'load_img'". What is the attribute error?</p>
  
  <pre><code>C:\flowers&gt;client.py
  Using TensorFlow backend.
  sending request...
  b'{\n    "predictions": [[0.895928, 0.0106584, 0.000519791, 0.092504, 0.000389838]\n    ]\n}'
  Traceback (most recent call last):
    File "C:\flowers\client.py", line 8, in &lt;module&gt;
      image = img_to_array(image.load_img(x, target_size=(128,128))) / 255
  AttributeError: 'numpy.ndarray' object has no attribute 'load_img'
  
  C:\flowers&gt;cmd \k
  Microsoft Windows [Version 10.0.17763.253]
  (c) 2018 Microsoft Corporation. All rights reserved.
  </code></pre>
  
  <p>How can I loop this array with POST requests?</p>