ahmetyaylalioglu commited on
Commit
d25512a
1 Parent(s): 80a267a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ def get_processed_inputs(image, points_str):
24
  # Parse the input string into a list of points
25
  points = list(map(int, points_str.split(',')))
26
  # Reshape the points into pairs
27
- input_points = [[points[i:i+2]] for i in range(0, len(points), 2)]
28
 
29
  inputs = processor(image, input_points=input_points, return_tensors="pt").to(device)
30
  with torch.no_grad():
 
24
  # Parse the input string into a list of points
25
  points = list(map(int, points_str.split(',')))
26
  # Reshape the points into pairs
27
+ input_points = [[[x, y] for x, y in zip(points[::2], points[1::2])]]
28
 
29
  inputs = processor(image, input_points=input_points, return_tensors="pt").to(device)
30
  with torch.no_grad():