SoulPerforms commited on
Commit
0de3469
·
verified ·
1 Parent(s): e32b2fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -36,6 +36,7 @@ def predict_image(img, conf_threshold, iou_threshold):
36
 
37
  return im
38
 
 
39
 
40
  iface = gr.Interface(
41
  fn=predict_image,
@@ -47,10 +48,10 @@ iface = gr.Interface(
47
  outputs=gr.Image(type="pil", label="Result"),
48
  title="Fire Detection using YOLOv8n on Gradio",
49
  description="Upload images for inference. The Ultralytics YOLOv8n trained model is used for inference.",
50
- gr.Examples([
51
- ["image/fire_image_1.jpg"], ["image/fire_image_2.jpg"], ["image/fire_image_3.jpg"],
52
-
53
- ])
54
  )
55
 
56
  if __name__ == '__main__':
 
36
 
37
  return im
38
 
39
+ current_directory = "/image"
40
 
41
  iface = gr.Interface(
42
  fn=predict_image,
 
48
  outputs=gr.Image(type="pil", label="Result"),
49
  title="Fire Detection using YOLOv8n on Gradio",
50
  description="Upload images for inference. The Ultralytics YOLOv8n trained model is used for inference.",
51
+ examples=[
52
+ [os.path.join(current_directory, "fire_image_1.jpg")],
53
+ [os.path.join(current_directory, "fire_image_3.jpg")],
54
+ ]
55
  )
56
 
57
  if __name__ == '__main__':