Q-bert commited on
Commit
a3abb26
1 Parent(s): 8ffa231

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import gradio as gr
2
  import sahi
3
  import torch
4
- from ultralyticsplus import YOLO
5
 
6
  # Download images
7
 
@@ -42,9 +42,10 @@ def yolov8_inference(
42
  current_model_name = model_name
43
  model.overrides["conf"] = conf_threshold
44
  model.overrides["iou"] = iou_threshold
45
- results = model.predict(image, imgsz=image_size)
46
-
47
  outputs=[]
 
48
  for i,box in enumerate(results[0].boxes):
49
  label = results[0].names[box.cls[0].item()]
50
  bbox = box.xyxy[0]
 
1
  import gradio as gr
2
  import sahi
3
  import torch
4
+ from ultralytics import YOLO
5
 
6
  # Download images
7
 
 
42
  current_model_name = model_name
43
  model.overrides["conf"] = conf_threshold
44
  model.overrides["iou"] = iou_threshold
45
+ results = model(image, return_outputs=True)
46
+ print(results)
47
  outputs=[]
48
+
49
  for i,box in enumerate(results[0].boxes):
50
  label = results[0].names[box.cls[0].item()]
51
  bbox = box.xyxy[0]