muhammadsalmanalfaridzi commited on
Commit
c3daebd
·
verified ·
1 Parent(s): e055386

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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