title: model_config = json_utils.decode(model_config.decode('utf-8')) AttributeError: 'str' object has no attribute 'decode'
body: <p>I am working on a project on Python that detects disease on leaves and sprays fertilizer on the leaf.</p>
  <p>After many hours of troubleshooting other errors, I came down to the following final error that always happens and I can't seem to fix.</p>
  <p>Following are the versions I have used for the dependencies so far:</p>
  <ul>
  <li>keras = 2.4.3</li>
  <li>cv2 = 4.5.1</li>
  <li>numpy = 1.20.1</li>
  <li>tensorflow = 2.4.0</li>
  <li>h5py = 3.2.1</li>
  <li>pandas = 1.2.3</li>
  </ul>
  <p>Error that I am facing:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;leaf_cnn.py&quot;, line 12, in &lt;module&gt;
      model = load_model('Leaf_CNN.h5')
    File &quot;/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/keras/saving/save.py&quot;, line 207, in load_model
      compile)
    File &quot;/home/pi/.local/lib/python3.7/site-packages/tensorflow/python/keras/saving/hdf5_format.py&quot;, line 182, in load_model_from_hdf5
      model_config = json_utils.decode(model_config.decode('utf-8'))
  AttributeError: 'str' object has no attribute 'decode'
  </code></pre>
  <p>Code file leaf_cnn.py</p>
  <pre><code># importing files/dependencies
  
  from tensorflow.keras.models import load_model
  import cv2
  import numpy as np
  #import Categories
  import time
  import RPi.GPIO as GPIO
  
  #loading model/ML algorithm 
  
  model = load_model('Leaf_CNN.h5')
  cap = cv2.VideoCapture(0) # capture frame
  ret, img = cap.read()
  
  channel = 21 
  GPIO.setmode(GPIO.BCM)
  GPIO.setup(channel,GPIO.OUT)
  #cv2.imshow('aaa',img)  'display image with title'
  
  img = cv2.resize(img,(224,224)) 
  img = np.reshape(img,[1,224,224,3])
  classes = model.predict(img)
  y_pred = np.argmax(classes, axis=1)
  y_pred = Categories.categories[int(y_pred)]
  
  if &quot;healthy&quot; not in y_pred:
      GPIO.output(21, GPIO.HIGH) #turn-on relay
      time.sleep(1)
  else:
      GPIO.output(21, GPIO.LOW) #turn-off relay
      time.sleep(1)
  #cv2.waitKey(0)
  #cv2.destroyAllWindows()
  </code></pre>