Spaces:
Build error
Build error
aswin-raghavan commited on
Commit ·
d378ca4
1
Parent(s): f1191ff
bugfix typo
Browse files
app.py
CHANGED
|
@@ -187,7 +187,7 @@ def predict(embeds, exemplars, lut):
|
|
| 187 |
dist_to_ex0 = np.abs(hd_embeds - exemplars[0][np.newaxis, ...]).sum(axis=-1)
|
| 188 |
dist_to_ex1 = np.abs(hd_embeds - exemplars[1][np.newaxis, ...]).sum(axis=-1)
|
| 189 |
print('dists', dist_to_ex0, dist_to_ex1)
|
| 190 |
-
odds = abs(dist_to_ex0 - dist_to_ex1)
|
| 191 |
if dist_to_ex1 < dist_to_ex0:
|
| 192 |
preds = np.array([1., odds])
|
| 193 |
else:
|
|
|
|
| 187 |
dist_to_ex0 = np.abs(hd_embeds - exemplars[0][np.newaxis, ...]).sum(axis=-1)
|
| 188 |
dist_to_ex1 = np.abs(hd_embeds - exemplars[1][np.newaxis, ...]).sum(axis=-1)
|
| 189 |
print('dists', dist_to_ex0, dist_to_ex1)
|
| 190 |
+
odds = np.abs(dist_to_ex0 - dist_to_ex1).item()
|
| 191 |
if dist_to_ex1 < dist_to_ex0:
|
| 192 |
preds = np.array([1., odds])
|
| 193 |
else:
|