Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,13 +37,13 @@ def process_frame(image):
|
|
37 |
return image
|
38 |
|
39 |
with gr.Blocks(title="Real-Time Object Detection") as app:
|
40 |
-
gr.Markdown("#
|
41 |
gr.Markdown("Supports live webcam streaming and image uploads")
|
42 |
|
43 |
with gr.Tabs():
|
44 |
with gr.TabItem("π· Live Camera"):
|
45 |
with gr.Row():
|
46 |
-
webcam_input = gr.
|
47 |
live_output = gr.Image(label="Processed Feed", streaming=True)
|
48 |
webcam_input.change(process_frame, webcam_input, live_output)
|
49 |
|
@@ -53,7 +53,7 @@ with gr.Blocks(title="Real-Time Object Detection") as app:
|
|
53 |
upload_output = gr.Image(label="Detection Result")
|
54 |
upload_input.change(process_frame, upload_input, upload_output)
|
55 |
|
56 |
-
gr.Markdown("
|
57 |
with gr.Accordion("Advanced Settings", open=False):
|
58 |
gr.Slider(minimum=0.1, maximum=0.9, value=0.5,
|
59 |
label="Confidence Threshold", interactive=True)
|
|
|
37 |
return image
|
38 |
|
39 |
with gr.Blocks(title="Real-Time Object Detection") as app:
|
40 |
+
gr.Markdown("# Real-Time Object Detection with Dual Input")
|
41 |
gr.Markdown("Supports live webcam streaming and image uploads")
|
42 |
|
43 |
with gr.Tabs():
|
44 |
with gr.TabItem("π· Live Camera"):
|
45 |
with gr.Row():
|
46 |
+
webcam_input = gr.Video(label="Live Feed", streaming=True)
|
47 |
live_output = gr.Image(label="Processed Feed", streaming=True)
|
48 |
webcam_input.change(process_frame, webcam_input, live_output)
|
49 |
|
|
|
53 |
upload_output = gr.Image(label="Detection Result")
|
54 |
upload_input.change(process_frame, upload_input, upload_output)
|
55 |
|
56 |
+
gr.Markdown("Performance Settings")
|
57 |
with gr.Accordion("Advanced Settings", open=False):
|
58 |
gr.Slider(minimum=0.1, maximum=0.9, value=0.5,
|
59 |
label="Confidence Threshold", interactive=True)
|