Update app.py
Browse files23 unmodified lines24252627282930313223 unmodified linesimg = img.convert("RGB")img_tensor = tfm(img)img_tensor = img_tensor[np.newaxis, :]pred_prob = model(img_tensor)pred_prob_numpy = pred_prob.detach().numpy()return pred_prob_numpygr.Interface(fn=predict, inputs=gr.Image(type="pil"), outputs="label").launch(debug=True)# gr.Interface(fn=predict, inputs=gr.Image(type="pil"), outputs="label").launch(debug=True)23 unmodified lines24252627282930313223 unmodified linesimg = img.convert("RGB")img_tensor = tfm(img)img_tensor = img_tensor[np.newaxis, :]pred_prob_tensor = model(img_tensor)pred_prob = pred_prob_tensor.detach()return pred_probgr.Interface(fn=predict, inputs=gr.Image(type="pil"), outputs="label").launch(debug=True)# gr.Interface(fn=predict, inputs=gr.Image(type="pil"), outputs="label").launch(debug=True)
app.py+3-3