gatesla commited on
Commit
5629095
·
verified ·
1 Parent(s): 510b4f7

Updating variable names

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -31,7 +31,7 @@ def detect_objects(model_name,url_input,image_input,threshold):
31
  processor = MaskFormerImageProcessor.from_pretrained(model_name)
32
  model = MaskFormerForInstanceSegmentation.from_pretrained(model_name)
33
 
34
- target_size = (image.shape[0], image.shape[1])
35
  inputs = preprocessor(images=image, return_tensors="pt")
36
  with torch.no_grad():
37
  outputs = model(**inputs)
 
31
  processor = MaskFormerImageProcessor.from_pretrained(model_name)
32
  model = MaskFormerForInstanceSegmentation.from_pretrained(model_name)
33
 
34
+ target_size = (image.size[0], image.size[1])
35
  inputs = preprocessor(images=image, return_tensors="pt")
36
  with torch.no_grad():
37
  outputs = model(**inputs)