Ean Yang commited on
Commit
e873cda
1 Parent(s): 3d10107

图片只能放在根目录

Browse files
Files changed (3) hide show
  1. app.py +3 -3
  2. bus.jpg +0 -0
  3. zidane.jpg +0 -0
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  import cv2
3
  import tempfile
4
  from ultralytics import YOLOv10
5
- import os
6
 
7
  def yolov10_inference(image, video, model_id, image_size, conf_threshold):
8
  model = YOLOv10.from_pretrained(f'jameslahm/{model_id}')
@@ -117,13 +117,13 @@ def app():
117
  gr.Examples(
118
  examples=[
119
  [
120
- os.path.join("ultralytics", "assets", "bus.jpg"),
121
  "yolov10s",
122
  640,
123
  0.25,
124
  ],
125
  [
126
- os.path.join("ultralytics", "assets", "zidane.jpg"),
127
  "yolov10s",
128
  640,
129
  0.25,
 
2
  import cv2
3
  import tempfile
4
  from ultralytics import YOLOv10
5
+
6
 
7
  def yolov10_inference(image, video, model_id, image_size, conf_threshold):
8
  model = YOLOv10.from_pretrained(f'jameslahm/{model_id}')
 
117
  gr.Examples(
118
  examples=[
119
  [
120
+ "./bus.jpg",
121
  "yolov10s",
122
  640,
123
  0.25,
124
  ],
125
  [
126
+ "./zidane.jpg",
127
  "yolov10s",
128
  640,
129
  0.25,
bus.jpg ADDED
zidane.jpg ADDED