def predict(frame):
    '\n    Takes a frame as input, makes a prediction, decoodes it\n    and returns a result string.\n    '
    img = cv2.resize(frame, (224, 224))
    img = cv2.cvtColor(np.float32(img), cv2.COLOR_BGR2RGB)
    img = img.reshape(1, 224, 224, 3)
    prediction = model.predict(img)
    label = decode_prediction(prediction)
    return label
Takes a frame as input, makes a prediction, decoodes it
and returns a result string.
def predict(frame):
    '\n    Takes a frame as input, makes a prediction, decoodes it\n    and returns a result string.\n    '
    img = cv2.resize(frame, (224, 224))
    img = cv2.cvtColor(np.float32(img), cv2.COLOR_BGR2RGB)
    img = img.reshape(1, 224, 224, 3)
    prediction = model.predict(img)
    label = decode_prediction(prediction)
    return label