Spaces:
Runtime error
Runtime error
Update app.py
Browse files4 unmodified lines56788910111112131428 unmodified lines434445464746474849504 unmodified lines
class_folders = ["Ajloun Castle", "Jeresh", "Petra", "Roman amphitheater", "Umm_Qais", "Wadi_Rum"]
Inception_path='./Models/new_efficientnet.h5'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/efficientnet-saved-model-06-val_acc-0.98.hdf5'EfficientNet_path= './Models/new_efficientnet.h5'
Inception_model = load_model(Inception_path)VGGNet_model = load_model(VGGNet_path)28 unmodified lines
if min_probability < 70: # Adjust the threshold as needed result_str = "Can't detect this image. Please try another one." class_name.append(result_str) return class_name, None, None 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