Update app.py
Browse files
app.py
CHANGED
|
@@ -264,9 +264,10 @@ with gr.Blocks(title = "Hello",
|
|
| 264 |
input_image = gr.Image(label = "Input image", type = "filepath")
|
| 265 |
|
| 266 |
with gr.Row():
|
| 267 |
-
|
|
|
|
|
|
|
| 268 |
#filepath = gr.UploadButton("Upload (png, jpg, tif etc)", visible=True, file_count = "single")
|
| 269 |
-
resize = gr.Number(label = 'max resize', value = 1000)
|
| 270 |
|
| 271 |
with gr.Column(scale=1):
|
| 272 |
send_btn = gr.Button("Run Cellpose-SAM")
|
|
@@ -290,7 +291,7 @@ with gr.Blocks(title = "Hello",
|
|
| 290 |
|
| 291 |
#input_image.change(update_image, input_image, [input_image, filepath])
|
| 292 |
#up_btn.upload(upload_file, up_btn, [input_image, up_btn, down_btn, down_btn2])
|
| 293 |
-
send_btn.click(cellpose_segment, [
|
| 294 |
|
| 295 |
#down_btn.click(download_function, None, [down_btn, down_btn2])
|
| 296 |
|
|
|
|
| 264 |
input_image = gr.Image(label = "Input image", type = "filepath")
|
| 265 |
|
| 266 |
with gr.Row():
|
| 267 |
+
with gr.Column(scale=1):
|
| 268 |
+
resize = gr.Number(label = 'max resize', value = 1000)
|
| 269 |
+
gr.HTML("""<h4 style="color:white;"> Note: you can load and process tifs, but they won't display in the input field above. </h4>""")
|
| 270 |
#filepath = gr.UploadButton("Upload (png, jpg, tif etc)", visible=True, file_count = "single")
|
|
|
|
| 271 |
|
| 272 |
with gr.Column(scale=1):
|
| 273 |
send_btn = gr.Button("Run Cellpose-SAM")
|
|
|
|
| 291 |
|
| 292 |
#input_image.change(update_image, input_image, [input_image, filepath])
|
| 293 |
#up_btn.upload(upload_file, up_btn, [input_image, up_btn, down_btn, down_btn2])
|
| 294 |
+
send_btn.click(cellpose_segment, [input_image, resize], [img_outlines, img_overlay, flows, down_btn, down_btn2])
|
| 295 |
|
| 296 |
#down_btn.click(download_function, None, [down_btn, down_btn2])
|
| 297 |
|