webcam - video, not a snapshot
Browse files
app.py
CHANGED
|
@@ -60,7 +60,8 @@ with gr.Blocks(title="Real-Time Zorro Mask Sandbox") as demo:
|
|
| 60 |
# Input: The live webcam stream. 'streaming=True' is crucial.
|
| 61 |
input_webcam = gr.Image(sources=["webcam"], streaming=True, label="Your Webcam Feed")
|
| 62 |
# Output: Where the processed video stream will be shown.
|
| 63 |
-
|
|
|
|
| 64 |
|
| 65 |
# This is the magic line that creates the real-time loop.
|
| 66 |
# It calls 'apply_zorro_mask' for every new frame from 'input_webcam'
|
|
|
|
| 60 |
# Input: The live webcam stream. 'streaming=True' is crucial.
|
| 61 |
input_webcam = gr.Image(sources=["webcam"], streaming=True, label="Your Webcam Feed")
|
| 62 |
# Output: Where the processed video stream will be shown.
|
| 63 |
+
# output_video = gr.Image(label="Live Zorro Mask Output")
|
| 64 |
+
output_video = gr.Image(label="Live Zorro Mask Output", streaming=True)
|
| 65 |
|
| 66 |
# This is the magic line that creates the real-time loop.
|
| 67 |
# It calls 'apply_zorro_mask' for every new frame from 'input_webcam'
|