I cant get a prediction return on my web application

Hello I followed a YouTube tutorial on how to deploy an image classification app on Streamlit. In this case I am adapting the code to suite an image classification app to identify cats and dogs.
I changed a few lines in the code however now it is not returning a prediction on whether the image is of a cat or dog when I upload an image.

Here is my code:

import matplotlib.pyplot as plt
import numpy as np
import os
import PIL
import tensorflow as tf
import streamlit as st 
import requests
import io

from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.models import Sequential

st.set_option('deprecation.showfileUploaderEncoding', False)
def load_model ():
    return model
         #Cats and Dogs

file = st.file_uploader("Please upload image of a cat or dog", type=["jpg","png"])
import cv2
from PIL import Image, ImageOps
import numpy as np 
def import_and_predict(image_data, model):

    size = (240,240)
    image = ImageOps.fit(image_data, size, Image.ANTIALIAS)
    img = np.asarray(image)
    img_reshape = img[np.newaxis,...]
    prediction = model.predict(img_reshape)

    return prediction
if file is None:
    st.text("Please upload an image file")
    image = Image.open(file)
    st.image(image, use_column_width=True)
    predictions = import_and_predict(image, model)
    class_names=['cat', 'dog']
    string="This image most likely is: "+class_names[np.argmax(predictions)]

Is this your question? If so, it looks like it’s been answered