ysr commited on
Commit
df051f3
·
1 Parent(s): 8f0dfbb
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -9,7 +9,10 @@ model = YOLO('best.pt')
9
  def show_preds_image(image_path):
10
  image = cv2.imread(image_path)
11
  outputs = model.predict(source=image_path)
 
12
  results = outputs[0].cpu().numpy()
 
 
13
  for i, det in enumerate(results.boxes.xyxy):
14
  cv2.rectangle(
15
  image,
@@ -66,7 +69,7 @@ interface_video = gr.Interface(
66
  fn=show_preds_video,
67
  inputs=inputs_video,
68
  outputs=outputs_video,
69
- title="Pothole detector",
70
  cache_examples=False,
71
  )
72
 
 
9
  def show_preds_image(image_path):
10
  image = cv2.imread(image_path)
11
  outputs = model.predict(source=image_path)
12
+ print("output:", outputs)
13
  results = outputs[0].cpu().numpy()
14
+ print("results:", results)
15
+
16
  for i, det in enumerate(results.boxes.xyxy):
17
  cv2.rectangle(
18
  image,
 
69
  fn=show_preds_video,
70
  inputs=inputs_video,
71
  outputs=outputs_video,
72
+ title="Cats and Dogs detector",
73
  cache_examples=False,
74
  )
75