Spaces:
Runtime error
Runtime error
jens
commited on
Commit
·
2f5a3a2
1
Parent(s):
43dcd18
tweaked upload image
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ with block:
|
|
| 42 |
with gr.Row():
|
| 43 |
with gr.Column():
|
| 44 |
with gr.Tab("Upload Image"):
|
| 45 |
-
|
| 46 |
with gr.Tab("Webcam"):
|
| 47 |
input_image = gr.Image(label='Input', type='pil', tool=None, source="webcam") # mirror_webcam = False
|
| 48 |
with gr.Row():
|
|
@@ -75,9 +75,9 @@ with block:
|
|
| 75 |
point_label_radio, text, reset_btn, sam_sgmt_everything_btn,
|
| 76 |
sam_decode_btn, depth_reconstruction_btn, prompt_image, lbl_image, n_samples, cube_size, selected_masks_image}
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
|
| 82 |
|
| 83 |
# event - init coords
|
|
|
|
| 42 |
with gr.Row():
|
| 43 |
with gr.Column():
|
| 44 |
with gr.Tab("Upload Image"):
|
| 45 |
+
upload_image = gr.Image(label='Input', type='pil', tool=None) # mirror_webcam = False
|
| 46 |
with gr.Tab("Webcam"):
|
| 47 |
input_image = gr.Image(label='Input', type='pil', tool=None, source="webcam") # mirror_webcam = False
|
| 48 |
with gr.Row():
|
|
|
|
| 75 |
point_label_radio, text, reset_btn, sam_sgmt_everything_btn,
|
| 76 |
sam_decode_btn, depth_reconstruction_btn, prompt_image, lbl_image, n_samples, cube_size, selected_masks_image}
|
| 77 |
|
| 78 |
+
def on_upload_image(input_image, upload_image):
|
| 79 |
+
return [upload_image, upload_image]
|
| 80 |
+
upload_image.upload(on_upload_image, [input_image, upload_image], [input_image, upload_image])
|
| 81 |
|
| 82 |
|
| 83 |
# event - init coords
|