Spaces:
Runtime error
Runtime error
Update app.py
Browse files21 unmodified lines22232425262716 unmodified lines44454647484950515253545556575859606121 unmodified linesResNet_model = load_model(ResNet_path)Efficient_model = load_model(EfficientNet_path)def classify_selected_model(image, model_name):try:16 unmodified linesprobability = round(max(predictions[0]) * 100, 2)result_str = f" {model_name} : {class_name} {probability}% , "history.append(result_str)return class_name, probability, historyexcept Exception as e:error_message = f"Error: {str(e)}"return "Error", None, error_messageimage_input = gr.Image(type='filepath', label="Input Image")history=[]model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")result_label = gr.Textbox(value="Exported Result")21 unmodified lines222324252627282916 unmodified lines464748495051525354555657585960616221 unmodified linesResNet_model = load_model(ResNet_path)Efficient_model = load_model(EfficientNet_path)history=[]def classify_selected_model(image, model_name):try:16 unmodified linesprobability = round(max(predictions[0]) * 100, 2)result_str = f" {model_name} : {class_name} {probability}% "history.append(result_str)return class_name, probability, historyexcept Exception as e:error_message = f"Error: {str(e)}"return None, None, Noneimage_input = gr.Image(type='filepath', label="Input Image")model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")result_label = gr.Textbox(value="Exported Result")
app.py+4-3