freddyaboulton HF staff commited on
Commit
67e08d4
1 Parent(s): 4467a7b
Files changed (1) hide show
  1. app.py +9 -13
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
- css=""
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
- with gr.Group(elem_classes=["my-group"]):
98
- video = gr.Video(label="Video Source")
99
- conf_threshold = gr.Slider(
100
- label="Confidence Threshold",
101
- minimum=0.0,
102
- maximum=1.0,
103
- step=0.05,
104
- value=0.30,
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