Update app.py
Browse files
app.py
CHANGED
@@ -22,9 +22,9 @@ def callback(image_slice: np.ndarray) -> sv.Detections:
|
|
22 |
|
23 |
# If the results are a list (likely from Roboflow), access them correctly
|
24 |
if isinstance(results, list):
|
25 |
-
# If results are a list of predictions, we need to handle each one
|
26 |
detections = []
|
27 |
for result in results:
|
|
|
28 |
detections.extend(sv.Detections.from_inference(result))
|
29 |
return detections
|
30 |
|
|
|
22 |
|
23 |
# If the results are a list (likely from Roboflow), access them correctly
|
24 |
if isinstance(results, list):
|
|
|
25 |
detections = []
|
26 |
for result in results:
|
27 |
+
# Ensure each result is processed into a Detections object
|
28 |
detections.extend(sv.Detections.from_inference(result))
|
29 |
return detections
|
30 |
|