Update app.py
Browse files
app.py
CHANGED
|
@@ -231,7 +231,11 @@ with gr.Blocks(title = "Hello",
|
|
| 231 |
gr.HTML("""<h4 style="color:white;">"pip install cellpose" for full functionality. </h4>""")
|
| 232 |
|
| 233 |
input_image = gr.Image(label = "Input image", type = "filepath")
|
| 234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 235 |
with gr.Row():
|
| 236 |
down_btn = gr.DownloadButton("Download masks (TIF)", visible=False)
|
| 237 |
down_btn2 = gr.DownloadButton("Download outlines (PNG)", visible=False)
|
|
@@ -247,7 +251,7 @@ with gr.Blocks(title = "Hello",
|
|
| 247 |
#masks = gr.Image(label = "Output image", type = "numpy")
|
| 248 |
|
| 249 |
|
| 250 |
-
send_btn.click(fn=cellpose_segment, inputs=[input_image], outputs=[img_outlines, img_overlay, flows, down_btn, down_btn2])
|
| 251 |
|
| 252 |
#down_btn.click(download_function, None, [down_btn, down_btn2])
|
| 253 |
|
|
|
|
| 231 |
gr.HTML("""<h4 style="color:white;">"pip install cellpose" for full functionality. </h4>""")
|
| 232 |
|
| 233 |
input_image = gr.Image(label = "Input image", type = "filepath")
|
| 234 |
+
|
| 235 |
+
with gr.Row():
|
| 236 |
+
resize = gr.Number(label = 'max size', value = 400)
|
| 237 |
+
send_btn = gr.Button("Run Cellpose-SAM")
|
| 238 |
+
|
| 239 |
with gr.Row():
|
| 240 |
down_btn = gr.DownloadButton("Download masks (TIF)", visible=False)
|
| 241 |
down_btn2 = gr.DownloadButton("Download outlines (PNG)", visible=False)
|
|
|
|
| 251 |
#masks = gr.Image(label = "Output image", type = "numpy")
|
| 252 |
|
| 253 |
|
| 254 |
+
send_btn.click(fn=cellpose_segment, inputs=[input_image, resize], outputs=[img_outlines, img_overlay, flows, down_btn, down_btn2])
|
| 255 |
|
| 256 |
#down_btn.click(download_function, None, [down_btn, down_btn2])
|
| 257 |
|