Spaces:
Runtime error
Runtime error
Update app.py
Browse files15 unmodified lines16171819202111 unmodified lines33343536373815 unmodified linesEfficient_model = load_model(EfficientNet_path)def classify_selected_model(image, model_name):img = cv2.imread(image)img = cv2.resize(img, (150, 150))img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)11 unmodified linesclass_index = np.argmax(predictions[0])class_name = class_folders[class_index]probability = round(max(predictions[0]) * 100, 2)return class_name, probability15 unmodified lines1617181920212211 unmodified lines34353637383940414215 unmodified linesEfficient_model = load_model(EfficientNet_path)def classify_selected_model(image, model_name):try:img = cv2.imread(image)img = cv2.resize(img, (150, 150))img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)11 unmodified linesclass_index = np.argmax(predictions[0])class_name = class_folders[class_index]probability = round(max(predictions[0]) * 100, 2)except Exception as e:return "Error", Nonereturn class_name, probability
app.py+4