Spaces:
Runtime error
Runtime error
eeshawn
commited on
Commit
•
0a4c6d9
1
Parent(s):
313c139
update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ yolo_model.overrides['max_det'] = 10
|
|
10 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
11 |
yolo_model.to(device)
|
12 |
|
13 |
-
|
14 |
|
15 |
def seal_detection(
|
16 |
image,
|
@@ -59,6 +59,7 @@ with gr.Blocks() as demo:
|
|
59 |
In this project, I leveraged transfer learning from the <a href="https://github.com/ultralytics/ultralytics" target="_blank">YOLOv8</a> model to customize an object detection model specifically for the hand seals. Developed by the Ultralytics team, YOLOv8 is the latest addition to the YOLO family and offers high performance while being easy to train and use.
|
60 |
"""
|
61 |
)
|
|
|
62 |
with gr.Row():
|
63 |
with gr.Column():
|
64 |
# inputs = [
|
@@ -73,19 +74,15 @@ with gr.Blocks() as demo:
|
|
73 |
# flag = gr.Button("Flag")
|
74 |
|
75 |
with gr.Row():
|
76 |
-
# gr.Examples(
|
77 |
-
# examples=[os.path.join(os.path.dirname(__file__), "/assets/Naruto_Hand_Seals_by_Megan.gif")],
|
78 |
-
# inputs=image,
|
79 |
-
# outputs=outputs,
|
80 |
-
# fn=seal_detection,
|
81 |
-
# run_on_click=True,
|
82 |
-
# preprocess=False,
|
83 |
-
# postprocess=False,
|
84 |
-
# cache_examples=True,
|
85 |
-
# )
|
86 |
gr.Examples(
|
87 |
-
[
|
88 |
-
inputs=
|
|
|
|
|
|
|
|
|
|
|
|
|
89 |
)
|
90 |
|
91 |
gr.Markdown(
|
|
|
10 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
11 |
yolo_model.to(device)
|
12 |
|
13 |
+
!wget -q https://github.com/gradio-app/gradio/raw/main/demo/blocks_inputs/lion.jpg
|
14 |
|
15 |
def seal_detection(
|
16 |
image,
|
|
|
59 |
In this project, I leveraged transfer learning from the <a href="https://github.com/ultralytics/ultralytics" target="_blank">YOLOv8</a> model to customize an object detection model specifically for the hand seals. Developed by the Ultralytics team, YOLOv8 is the latest addition to the YOLO family and offers high performance while being easy to train and use.
|
60 |
"""
|
61 |
)
|
62 |
+
|
63 |
with gr.Row():
|
64 |
with gr.Column():
|
65 |
# inputs = [
|
|
|
74 |
# flag = gr.Button("Flag")
|
75 |
|
76 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
gr.Examples(
|
78 |
+
examples=[os.path.join(os.path.dirname(__file__), "lion.jpg")],
|
79 |
+
inputs=image,
|
80 |
+
outputs=outputs,
|
81 |
+
fn=seal_detection,
|
82 |
+
run_on_click=True,
|
83 |
+
# preprocess=False,
|
84 |
+
# postprocess=False,
|
85 |
+
cache_examples=True,
|
86 |
)
|
87 |
|
88 |
gr.Markdown(
|