Spaces:
Sleeping
Sleeping
added examples
Browse files
app.py
CHANGED
@@ -1,10 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
from ultralytics import YOLO
|
3 |
import numpy as np
|
|
|
4 |
|
5 |
# Load YOLO model
|
6 |
model = YOLO('./best.pt')
|
7 |
|
|
|
|
|
8 |
def process_image(input_image):
|
9 |
if input_image is not None:
|
10 |
results = model(input_image)
|
@@ -21,7 +24,7 @@ iface = gr.Interface(
|
|
21 |
outputs=gr.Image(), # Specify output as Gradio Image
|
22 |
title="YOLOv8-obb aerial detection",
|
23 |
description="YOLOv8-obb trained on DOTAv1.5",
|
24 |
-
|
25 |
|
26 |
# Launch the Gradio interface
|
27 |
iface.launch()
|
|
|
1 |
import gradio as gr
|
2 |
from ultralytics import YOLO
|
3 |
import numpy as np
|
4 |
+
import os
|
5 |
|
6 |
# Load YOLO model
|
7 |
model = YOLO('./best.pt')
|
8 |
|
9 |
+
example_list = [["examples/" + example] for example in os.listdir("examples")]
|
10 |
+
|
11 |
def process_image(input_image):
|
12 |
if input_image is not None:
|
13 |
results = model(input_image)
|
|
|
24 |
outputs=gr.Image(), # Specify output as Gradio Image
|
25 |
title="YOLOv8-obb aerial detection",
|
26 |
description="YOLOv8-obb trained on DOTAv1.5",
|
27 |
+
examples=example_list)
|
28 |
|
29 |
# Launch the Gradio interface
|
30 |
iface.launch()
|
examples/istockphoto-637654476-2048x2048.jpg
ADDED
examples/pexels-aleksejs-bergmanis-681335_jpg.rf.8c238b5f9ea30a12edb48cd11bc7bf15.jpg
ADDED