Update app.py
Browse files21 unmodified lines2223242526272829303121 unmodified linesreturn img_tensordef process_img(image):img = np.array(image)img = img / 255.img = img.astype(np.float32)y = torch.tensor(img).permute(2,0,1).unsqueeze(0).to(device)with torch.no_grad():result = model(y)21 unmodified lines2223242526272821 unmodified linesreturn img_tensordef process_img(image):y = img.to(device)with torch.no_grad():result = model(y)
app.py+1-4