Spaces:
Running
on
Zero
Running
on
Zero
fancy layout
Browse files
app.py
CHANGED
@@ -113,20 +113,21 @@ def streaming_object_detection(recording_id: str, img):
|
|
113 |
|
114 |
with gr.Blocks() as demo:
|
115 |
with gr.Row():
|
116 |
-
with gr.Column():
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
|
|
130 |
|
131 |
# We make a new recording id, and store it in a Gradio's session state.
|
132 |
recording_id = gr.State(uuid.uuid4())
|
|
|
113 |
|
114 |
with gr.Blocks() as demo:
|
115 |
with gr.Row():
|
116 |
+
with gr.Column(scale=1):
|
117 |
+
with gr.Accordion("Your image", open=True):
|
118 |
+
img = gr.Image(interactive=True, label="Image")
|
119 |
+
detect_objects = gr.Button("Detect objects")
|
120 |
+
|
121 |
+
with gr.Column(scale=4):
|
122 |
+
viewer = Rerun(
|
123 |
+
streaming=True,
|
124 |
+
panel_states={
|
125 |
+
"time": "collapsed",
|
126 |
+
"blueprint": "hidden",
|
127 |
+
"selection": "hidden",
|
128 |
+
},
|
129 |
+
height=700,
|
130 |
+
)
|
131 |
|
132 |
# We make a new recording id, and store it in a Gradio's session state.
|
133 |
recording_id = gr.State(uuid.uuid4())
|