Spaces:
Sleeping
Sleeping
AI Agent commited on
Commit ·
e453ecf
1
Parent(s): a284745
Fix tracking API return types for PyTorch models
Browse files
app.py
CHANGED
|
@@ -488,7 +488,11 @@ class CTM_ART17:
|
|
| 488 |
best_pred = predictions[:, :, best_tick_idx].cpu().numpy()[0]
|
| 489 |
|
| 490 |
# sync_out shape
|
| 491 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 492 |
|
| 493 |
result = {
|
| 494 |
"predictions": final_pred.tolist(),
|
|
|
|
| 488 |
best_pred = predictions[:, :, best_tick_idx].cpu().numpy()[0]
|
| 489 |
|
| 490 |
# sync_out shape
|
| 491 |
+
if track:
|
| 492 |
+
# When track=True, sync_outs is a tuple of numpy arrays (synch_out_tracking, synch_action_tracking)
|
| 493 |
+
sync_matrix = sync_outs[0][0] if sync_outs[0] is not None and len(sync_outs[0]) > 0 else None
|
| 494 |
+
else:
|
| 495 |
+
sync_matrix = sync_outs[0].cpu().numpy()[0] if sync_outs[0] is not None else None
|
| 496 |
|
| 497 |
result = {
|
| 498 |
"predictions": final_pred.tolist(),
|