Spaces:
Runtime error
Runtime error
Update app.py
Browse files123def predict_image(img):img_4d=img.reshape(-1,299,299,3)img_4d=img_4d/255123456789101112131415161718192021222324252627282930!pip install gradioimport osimport shutilimport globfrom tqdm.notebook import tqdmimport numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsimport tensorflow as tffrom tensorflow import kerasimport cv2from PIL import Imagefrom tensorflow.keras.preprocessing.image import ImageDataGeneratorimport randomfrom random import seed#from livelossplot import PlotLossesKerasimport mathfrom tensorflow.keras.metrics import Recall,Precision,AUCfrom keras.models import load_modelmodel = load_model('target_xception_model.h5')class_names={0:'خبيث',1:'حميد'}def predict_image(img):img_4d=img.reshape(-1,299,299,3)img_4d=img_4d/255
app.py+27