Spaces:
Runtime error
Runtime error
Update app.py
Browse files1 unmodified line2345679 unmodified lines1718192021222324251 unmodified lineimport cv2import numpy as npfrom tensorflow.keras.models import load_modelclass_folders = ["Ajloun Castle", "Jeresh", "Petra", "Roman amphitheater", "Umm_Qais", "Wadi_Rum"]9 unmodified linesEfficient_model = load_model(EfficientNet_path)history=[]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)1 unmodified line23456789101112139 unmodified lines2324252627282930311 unmodified lineimport cv2import numpy as npfrom tensorflow.keras.models import load_modelimport requests# Download human-readable labels for ImageNet.response = requests.get("https://git.io/JJkYN")labels = response.text.split("\n")class_folders = ["Ajloun Castle", "Jeresh", "Petra", "Roman amphitheater", "Umm_Qais", "Wadi_Rum"]9 unmodified linesEfficient_model = load_model(EfficientNet_path)def classify_selected_model(image, model_name):try:history=[]img = cv2.imread(image)img = cv2.resize(img, (150, 150))img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
app.py+7-1