Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
be0c819
1
Parent(s):
ddecbe9
fix markdown and example loading
Browse files
app.py
CHANGED
@@ -113,9 +113,13 @@ def query(frame, classes, confidence_threshold, max_side=360):
|
|
113 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
114 |
gr.Markdown("## Real Time Open Vocabulary Object Detection with Omdet-Turbo")
|
115 |
gr.Markdown(
|
116 |
-
"
|
117 |
-
|
118 |
-
|
|
|
|
|
|
|
|
|
119 |
)
|
120 |
gr.Markdown(
|
121 |
"Simply upload a video, and write the objects you want to detect! You can also play with confidence threshold, image size, or try the examples below. 👇"
|
@@ -124,7 +128,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
124 |
with gr.Row():
|
125 |
with gr.Column():
|
126 |
input_video = gr.Video(label="Input Video")
|
127 |
-
submit = gr.Button()
|
128 |
with gr.Column():
|
129 |
output_video = gr.Video(label="Output Video")
|
130 |
actual_fps = gr.Markdown("", visible=False)
|
@@ -150,7 +154,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
150 |
step=10,
|
151 |
)
|
152 |
example = gr.Examples(
|
153 |
-
fn=process_video,
|
154 |
examples=[
|
155 |
["./football.mp4", 0.3, "person, ball, shoe", 640],
|
156 |
["./cat.mp4", 0.2, "cat", 640],
|
|
|
113 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
114 |
gr.Markdown("## Real Time Open Vocabulary Object Detection with Omdet-Turbo")
|
115 |
gr.Markdown(
|
116 |
+
"""
|
117 |
+
This is a demo for open vocabulary object detection using OmDet-Turbo.
|
118 |
+
|
119 |
+
It runs on ZeroGPU which captures GPU every first time you infer. This combined with video processing time means that the demo inference time is slower than the model's actual inference time.
|
120 |
+
|
121 |
+
The actual model inference FPS is displayed under the processed video after inference.
|
122 |
+
"""
|
123 |
)
|
124 |
gr.Markdown(
|
125 |
"Simply upload a video, and write the objects you want to detect! You can also play with confidence threshold, image size, or try the examples below. 👇"
|
|
|
128 |
with gr.Row():
|
129 |
with gr.Column():
|
130 |
input_video = gr.Video(label="Input Video")
|
131 |
+
submit = gr.Button(variant="primary")
|
132 |
with gr.Column():
|
133 |
output_video = gr.Video(label="Output Video")
|
134 |
actual_fps = gr.Markdown("", visible=False)
|
|
|
154 |
step=10,
|
155 |
)
|
156 |
example = gr.Examples(
|
|
|
157 |
examples=[
|
158 |
["./football.mp4", 0.3, "person, ball, shoe", 640],
|
159 |
["./cat.mp4", 0.2, "cat", 640],
|