faranbutt789 commited on
Commit
60364fb
·
verified ·
1 Parent(s): 9c6ae09

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -56,7 +56,7 @@ def predict_keypoints(image):
56
  # Convert PIL → CV2 → tensor
57
  img = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) / 255.0
58
  img_resized = cv2.resize(img, (224,224))
59
- input_tensor = transform(img_resized).unsqueeze(0).to(device)
60
 
61
  with torch.no_grad():
62
  pred = model(input_tensor)
 
56
  # Convert PIL → CV2 → tensor
57
  img = cv2.cvtColor(np.array(image), cv2.COLOR_RGB2BGR) / 255.0
58
  img_resized = cv2.resize(img, (224,224))
59
+ input_tensor = transform(img_resized).unsqueeze(0).float().to(device)
60
 
61
  with torch.no_grad():
62
  pred = model(input_tensor)