Spaces:
Runtime error
Runtime error
Update app.py
Browse files32 unmodified lines33343536373839404136373839404142434344454632 unmodified lines
# Run inference based on the selected model model = { "ResNet": onnx_resnet_model, "EfficientNet": onnx_efficientnet_model, "VGGNet": onnx_vggnet_model, # "InceptionV3": onnx_inception_model # Uncomment or remove based on your needs }[model_choice]
"ResNet": onnx_resnet_model, "EfficientNet": onnx_efficientnet_model, "VGGNet": onnx_vggnet_model, # "InceptionV3": onnx_inception_model # Uncomment or remove based on your needs }[model_choice] input_name = model.get_inputs()[0].name try: predictions = model.run(None, {"input": img_preprocessed}) predictions = model.run(None, {input_name: img_preprocessed}) class_idx = np.argmax(predictions) class_name = class_names[class_idx]
app.py+7-7