Update app.py
Browse files
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 |
-
|
51 |
-
[
|
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__':
|