Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,15 +1,20 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
-
def webcam(video0,video1):
|
4 |
-
return video0,video1
|
5 |
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
)
|
13 |
|
14 |
if __name__ == "__main__":
|
15 |
-
|
|
|
1 |
import gradio as gr
|
2 |
+
from gradio_webrtc import WebRTC
|
3 |
|
|
|
|
|
4 |
|
5 |
+
with gr.Blocks() as demo:
|
6 |
+
image = WebRTC(label="Stream", mode="send-receive", modality="video")
|
7 |
+
conf_threshold = gr.Slider(
|
8 |
+
label="Confidence Threshold",
|
9 |
+
minimum=0.0,
|
10 |
+
maximum=1.0,
|
11 |
+
step=0.05,
|
12 |
+
value=0.30,
|
13 |
+
)
|
14 |
+
image.stream(
|
15 |
+
inputs=[image, conf_threshold],
|
16 |
+
outputs=[image], time_limit=10
|
17 |
)
|
18 |
|
19 |
if __name__ == "__main__":
|
20 |
+
demo.launch()
|