Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
67e08d4
1
Parent(s):
4467a7b
Add code
Browse files
app.py
CHANGED
@@ -75,11 +75,8 @@ def stream_object_detection(video, conf_threshold):
|
|
75 |
iterating, frame = cap.read()
|
76 |
n_frames += 1
|
77 |
|
78 |
-
# css=""".my-group {max-width: 600px !important; max-height: 600 !important;}
|
79 |
-
# .my-column {display: flex !important; justify-content: center !important; align-items: center !important};"""
|
80 |
|
81 |
-
|
82 |
-
with gr.Blocks(css=css) as app:
|
83 |
gr.HTML(
|
84 |
"""
|
85 |
<h1 style='text-align: center'>
|
@@ -94,15 +91,14 @@ with gr.Blocks(css=css) as app:
|
|
94 |
""")
|
95 |
with gr.Row():
|
96 |
with gr.Column():
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
)
|
106 |
with gr.Column():
|
107 |
output_video = gr.Video(label="Processed Video", streaming=True, autoplay=True)
|
108 |
|
|
|
75 |
iterating, frame = cap.read()
|
76 |
n_frames += 1
|
77 |
|
|
|
|
|
78 |
|
79 |
+
with gr.Blocks() as app:
|
|
|
80 |
gr.HTML(
|
81 |
"""
|
82 |
<h1 style='text-align: center'>
|
|
|
91 |
""")
|
92 |
with gr.Row():
|
93 |
with gr.Column():
|
94 |
+
video = gr.Video(label="Video Source")
|
95 |
+
conf_threshold = gr.Slider(
|
96 |
+
label="Confidence Threshold",
|
97 |
+
minimum=0.0,
|
98 |
+
maximum=1.0,
|
99 |
+
step=0.05,
|
100 |
+
value=0.30,
|
101 |
+
)
|
|
|
102 |
with gr.Column():
|
103 |
output_video = gr.Video(label="Processed Video", streaming=True, autoplay=True)
|
104 |
|