ethanrom commited on
Commit
87fb980
·
1 Parent(s): 192f4a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -5,9 +5,9 @@ from sahi.utils.cv import visualize_object_predictions, read_image
5
  from ultralyticsplus import YOLO
6
 
7
  # Images
8
- torch.hub.download_url_to_file('https://ibb.co/zrFWRhJ][img]https://i.ibb.co/37v5Nyz/01-missing-hole-02-jpg-rf-3bd05d8784b12c66da03831d326edd2b.jpg', 'hole.jpg')
9
- torch.hub.download_url_to_file('https://ibb.co/qgPMXvN][img]https://i.ibb.co/rp1GTVx/01-mouse-bite-04-jpg-rf-8b3b06d80ac553a92606bdac3e394bb9.jpg', 'mouse.jpg')
10
- torch.hub.download_url_to_file('https://ibb.co/0Q35SLN][img]https://i.ibb.co/DLndyFX/12-spur-05-jpg-rf-39e4c0bbc17325d83c938d49e5efdf47.jpg', 'spur.jpg')
11
 
12
  def yolov8_inference(
13
  image: gr.inputs.Image = None,
@@ -71,7 +71,7 @@ inputs = [
71
  outputs = gr.outputs.Image(type="filepath", label="Output Image")
72
  title = "YOLOv8 PCB defect detection"
73
 
74
- examples = [['highway.jpg', 'ethanrom/pcb_def', 640, 0.25, 0.45]]
75
  demo_app = gr.Interface(
76
  fn=yolov8_inference,
77
  inputs=inputs,
 
5
  from ultralyticsplus import YOLO
6
 
7
  # Images
8
+ #torch.hub.download_url_to_file('https://ibb.co/zrFWRhJ][img]https://i.ibb.co/37v5Nyz/01-missing-hole-02-jpg-rf-3bd05d8784b12c66da03831d326edd2b.jpg', 'hole.jpg')
9
+ #torch.hub.download_url_to_file('https://ibb.co/qgPMXvN][img]https://i.ibb.co/rp1GTVx/01-mouse-bite-04-jpg-rf-8b3b06d80ac553a92606bdac3e394bb9.jpg', 'mouse.jpg')
10
+ #torch.hub.download_url_to_file('https://ibb.co/0Q35SLN][img]https://i.ibb.co/DLndyFX/12-spur-05-jpg-rf-39e4c0bbc17325d83c938d49e5efdf47.jpg', 'spur.jpg')
11
 
12
  def yolov8_inference(
13
  image: gr.inputs.Image = None,
 
71
  outputs = gr.outputs.Image(type="filepath", label="Output Image")
72
  title = "YOLOv8 PCB defect detection"
73
 
74
+ #examples = [['highway.jpg', 'ethanrom/pcb_def', 640, 0.25, 0.45]]
75
  demo_app = gr.Interface(
76
  fn=yolov8_inference,
77
  inputs=inputs,