Spaces:
Runtime error
Runtime error
Update app.py
Browse files21 unmodified lines222324252627282916 unmodified lines464748474950515253545355565758595860616221 unmodified linesResNet_model = load_model(ResNet_path)Efficient_model = load_model(EfficientNet_path)
history=[]def classify_selected_model(image, model_name): try: 16 unmodified lines probability = round(max(predictions[0]) * 100, 2) result_str = f" {model_name} : {class_name} {probability}% , " result_str = f" {model_name} : {class_name} {probability}% " history.append(result_str) return class_name, probability, history except Exception as e: error_message = f"Error: {str(e)}" return "Error", None, error_message return None, None, None
image_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")
app.py+4-3