Loading my yolov5 model from wandb to Gradio
I am working on colab and trying to load a yolov5 model from my wandb, so that I can use it on Gradio UI.  I tried: model = torch.hub.load(‘yolov5/wandb.run.dir’, ‘model.h5’)  and other syntax without success. How do I load the model to use on the Gradio interface please?image1008×481 43.6 KB
2022-03-28T11:18:18Z
HelloYou can pass your model to the function that is used by your interface like follows:def infer(inputs):
# write your inference code here
model.predict(inputs)
return outputsthen dogr.Interface(infer, ...).launch()You can check outthis blog postorGradio docs.