SamDaLamb commited on
Commit
e6a7fbf
·
verified ·
1 Parent(s): c606109

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,11 +52,11 @@ def detect_objects_in_image(image):
52
  # Ensure image is a PIL Image
53
  data = Image.fromarray(image)
54
 
55
- if isinstance(image, torch.Tensor):
56
  print("hey")
57
  image = transforms.ToPILImage()(data) # Convert tensor to PIL image
58
 
59
- if isinstance(image, Image.Image):
60
  print("hey2")
61
  orig_w, orig_h = data.size # PIL image size returns (width, height)
62
  else:
 
52
  # Ensure image is a PIL Image
53
  data = Image.fromarray(image)
54
 
55
+ if isinstance(data, torch.Tensor):
56
  print("hey")
57
  image = transforms.ToPILImage()(data) # Convert tensor to PIL image
58
 
59
+ if isinstance(dara, Image.Image):
60
  print("hey2")
61
  orig_w, orig_h = data.size # PIL image size returns (width, height)
62
  else: