Spaces:
Runtime error
Runtime error
Update app.py
Browse files32 unmodified lines333435363738394041424344454620 unmodified lines67686970717232 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]20 unmodified linesiface = gr.Interface(fn=classify_image,inputs=[image_input, gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")],outputs=["json"],live=True).launch(share=True)32 unmodified lines333435363738394041424344454620 unmodified lines676869707172737432 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]20 unmodified linesiface = gr.Interface(fn=classify_image,inputs=[image_input, gr.Dropdown(["ResNet", "EfficientNet", "VGGNet", "InceptionV3"], label="Select Model")],outputs="json",live=True)iface.launch(share=True)
app.py+10-8