Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
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
|