Aumkeshchy2003 commited on
Commit
b86490c
Β·
verified Β·
1 Parent(s): eaa57e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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("# πŸš€ 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.Webcam(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,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("### βš™οΈ 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)
 
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)