Spaces:
Runtime error
Runtime error
Update app.py
Browse files40 unmodified lines41424344454647484950515253545556575840 unmodified linesresult_str = f"Predicted Class: {class_name}\nProbability: {probability}%\nModel: {model_name}"history.append(result_str)return class_name, probability, result_strexcept Exception as e:error_message = f"Error: {str(e)}"history.append(error_message)return "Error", None, error_messageimage_input = gr.Image(type='filepath', label="Input Image")model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")result_label = gr.Label(value="Exported Result")iface = gr.Interface(fn=classify_selected_model,40 unmodified lines414243444546474849505152535455565740 unmodified linesresult_str = f"Predicted Class: {class_name}\nProbability: {probability}%\nModel: {model_name}"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")model_dropdown = gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")result_label = gr.Textbox(value="Exported Result")iface = gr.Interface(fn=classify_selected_model,
app.py+2-3