Spaces:
Runtime error
Runtime error
Update app.py
Browse files4 unmodified lines56789101112131428 unmodified lines43444546474849504 unmodified linesclass_folders = ["Ajloun Castle", "Jeresh", "Petra", "Roman amphitheater", "Umm_Qais", "Wadi_Rum"]Inception_path='./Models/new_efficientnet.h5'VGGNet_path='./Models/new_vgg_16.hdf5'ResNet_path= './Models/new_resnet50.hdf5'EfficientNet_path= './Models/efficientnet-saved-model-06-val_acc-0.98.hdf5'Inception_model = load_model(Inception_path)VGGNet_model = load_model(VGGNet_path)28 unmodified linesif min_probability < 70: # Adjust the threshold as neededresult_str = "Can't detect this image. Please try another one."class_name.append(result_str)return class_name, None, Nonebest_model = max(all_predictions, key=all_predictions.get)class_name = class_folders[np.argmax(models[best_model].predict(img)[0])]4 unmodified lines56789101112131428 unmodified lines43444546474849504 unmodified linesclass_folders = ["Ajloun Castle", "Jeresh", "Petra", "Roman amphitheater", "Umm_Qais", "Wadi_Rum"]Inception_path='./Models/inceptionv3_-saved-model-59-val_accuracy-0.94.hdf5'VGGNet_path='./Models/new_vgg_16.hdf5'ResNet_path= './Models/new_resnet50.hdf5'EfficientNet_path= './Models/new_efficientnet.h5'Inception_model = load_model(Inception_path)VGGNet_model = load_model(VGGNet_path)28 unmodified linesif min_probability < 70: # Adjust the threshold as neededresult_str = "Can't detect this image. Please try another one."history.append(result_str)return None, None, history[-1]best_model = max(all_predictions, key=all_predictions.get)class_name = class_folders[np.argmax(models[best_model].predict(img)[0])]
app.py+4-4