TYH71 commited on
Commit
e7d72c7
1 Parent(s): 7eb11b2

refactor: yolov5 examples

Browse files
Files changed (1) hide show
  1. src/interface/yolov5.py +5 -1
src/interface/yolov5.py CHANGED
@@ -58,6 +58,10 @@ ARTICLE = """
58
  YOLOv5 is open-sourced by Ultralytics for open source and academic proejcts under a **GPL 3.0 License**.
59
  """
60
 
 
 
 
 
61
  yolov5_demo = gr.Interface(
62
  fn=yolov5_demo_fn,
63
  inputs=[
@@ -71,7 +75,7 @@ yolov5_demo = gr.Interface(
71
  title="YOLOv5 Object Detection",
72
  description=DESCRIPTION,
73
  article=ARTICLE,
74
- examples=list(map(lambda x: [x, 0.25, 0.3], glob.glob("examples/*"))),
75
  allow_flagging="never"
76
  )
77
  logger.info("YOLOv5 Interface Built")
 
58
  YOLOv5 is open-sourced by Ultralytics for open source and academic proejcts under a **GPL 3.0 License**.
59
  """
60
 
61
+ examples = [
62
+ ["examples\ash_ketchum_world_champion_screenshot_3.webp", 0.25, 0.3]
63
+ ]
64
+
65
  yolov5_demo = gr.Interface(
66
  fn=yolov5_demo_fn,
67
  inputs=[
 
75
  title="YOLOv5 Object Detection",
76
  description=DESCRIPTION,
77
  article=ARTICLE,
78
+ examples=examples,
79
  allow_flagging="never"
80
  )
81
  logger.info("YOLOv5 Interface Built")