ducha-aiki commited on
Commit
a97398f
·
verified ·
1 Parent(s): 6027162

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -27,7 +27,9 @@ def inference(point1, point2, point3, point4):
27
  w.append(1 - p2_noise.mean())
28
  pts = torch.stack(pts)
29
  w = torch.stack(w)
30
-
 
 
31
  l2 = fit_line(pts, w)
32
 
33
  # project some points along the estimated line
 
27
  w.append(1 - p2_noise.mean())
28
  pts = torch.stack(pts)
29
  w = torch.stack(w)
30
+ if len(pts.shape) == 2:
31
+ pts = pts[None]
32
+
33
  l2 = fit_line(pts, w)
34
 
35
  # project some points along the estimated line