kevinconka commited on
Commit
99ec3f3
·
verified ·
1 Parent(s): 5bc0786

Update model_yolov5.py

Browse files
Files changed (1) hide show
  1. model_yolov5.py +2 -2
model_yolov5.py CHANGED
@@ -12,11 +12,11 @@ def load_model(model_path, img_size=640):
12
  return model
13
 
14
 
15
- # @spaces.GPU
16
  def inference(model, image):
17
  """Run inference on image and return annotated image."""
18
  results = model(image, size=model.img_size)
19
- print(results)
20
  annotator = Annotator(np.asarray(image))
21
  for *box, _, cls in reversed(results.pred[0]):
22
  # label = f'{model.names[int(cls)]} {conf:.2f}'
 
12
  return model
13
 
14
 
15
+ @spaces.GPU
16
  def inference(model, image):
17
  """Run inference on image and return annotated image."""
18
  results = model(image, size=model.img_size)
19
+ print(f"{results=}")
20
  annotator = Annotator(np.asarray(image))
21
  for *box, _, cls in reversed(results.pred[0]):
22
  # label = f'{model.names[int(cls)]} {conf:.2f}'