Spaces:
Runtime error
Runtime error
Add labels to the image components
Browse files
app.py
CHANGED
@@ -110,11 +110,11 @@ with demo:
|
|
110 |
""")
|
111 |
with gr.Tabs():
|
112 |
with gr.TabItem(label="Upload an image"):
|
113 |
-
uploaded_image = gr.Image(type="numpy")
|
114 |
example_image = gr.Examples(examples=[['examples/example-01.jpg', 1, 0.4], ['examples/example-02.jpg', 2, 0.5], ['examples/example-03.jpg', 1, 0.5]], inputs=[uploaded_image, max_num_hands, min_detection_conf])
|
115 |
submit_uploaded_image = gr.Button(value="Process Image")
|
116 |
with gr.TabItem(label="Take a picture"):
|
117 |
-
camera_picture = gr.Image(source="webcam", type="numpy")
|
118 |
submit_camera_picture = gr.Button(value="Process Image")
|
119 |
|
120 |
gr.Markdown("""
|
@@ -126,8 +126,8 @@ with demo:
|
|
126 |
left_hands = gr.Number(label="Left hands detected")
|
127 |
with gr.Column():
|
128 |
right_hands = gr.Number(label="Right hands detected")
|
129 |
-
multi_handedness = gr.JSON(label="Raw results")
|
130 |
-
processed_image = gr.Image()
|
131 |
|
132 |
gr.Markdown('<img id="visitor-badge" alt="visitor badge" src="https://visitor-badge.glitch.me/badge?page_id=kristyc.mediapipe-hands" />')
|
133 |
setting_inputs = [
|
|
|
110 |
""")
|
111 |
with gr.Tabs():
|
112 |
with gr.TabItem(label="Upload an image"):
|
113 |
+
uploaded_image = gr.Image(type="numpy", label="Input image")
|
114 |
example_image = gr.Examples(examples=[['examples/example-01.jpg', 1, 0.4], ['examples/example-02.jpg', 2, 0.5], ['examples/example-03.jpg', 1, 0.5]], inputs=[uploaded_image, max_num_hands, min_detection_conf])
|
115 |
submit_uploaded_image = gr.Button(value="Process Image")
|
116 |
with gr.TabItem(label="Take a picture"):
|
117 |
+
camera_picture = gr.Image(source="webcam", type="numpy", label="Input image")
|
118 |
submit_camera_picture = gr.Button(value="Process Image")
|
119 |
|
120 |
gr.Markdown("""
|
|
|
126 |
left_hands = gr.Number(label="Left hands detected")
|
127 |
with gr.Column():
|
128 |
right_hands = gr.Number(label="Right hands detected")
|
129 |
+
multi_handedness = gr.JSON(label="Raw handedness results")
|
130 |
+
processed_image = gr.Image(label="Processed image")
|
131 |
|
132 |
gr.Markdown('<img id="visitor-badge" alt="visitor badge" src="https://visitor-badge.glitch.me/badge?page_id=kristyc.mediapipe-hands" />')
|
133 |
setting_inputs = [
|