Spaces:
Runtime error
Runtime error
Update app.py
Browse files32 unmodified lines333435363738394041424344454632 unmodified lines# Run inference based on the selected modelmodel = {"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]try:predictions = model.run(None, {"input": img_preprocessed})class_idx = np.argmax(predictions)class_name = class_names[class_idx]32 unmodified lines333435363738394041424344454632 unmodified lines# Run inference based on the selected modelmodel = {"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].nametry:predictions = model.run(None, {input_name: img_preprocessed})class_idx = np.argmax(predictions)class_name = class_names[class_idx]
app.py+7-7