Spaces:
Runtime error
Runtime error
Update app.py
Browse files21 unmodified lines222324252526282728293013 unmodified lines44454648474849503 unmodified lines54555658575859606121 unmodified linesResNet_model = load_model(ResNet_path)Efficient_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)13 unmodified lines probability = round(max(predictions[0]) * 100, 2) result_str = f"Model: {model_name} , Probability: {probability}%\n" result_str = f" {model_name} : {probability}% , " history.append(result_str) return class_name, probability, history 3 unmodified lines
image_input = gr.Image(type='filepath', label="Input Image")image_input = gr.Image(type='filepath', label="Input Imagehistory=[]model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")result_label = gr.Textbox(value="Exported Result")
app.py+4-4