Update app.py
Browse files
app.py
CHANGED
|
@@ -133,9 +133,9 @@ def cellpose_segment(img_input):
|
|
| 133 |
#masks = Image.fromarray(255. * crand[masks])
|
| 134 |
|
| 135 |
pil_masks = Image.fromarray((masks/masks.max()).astype('float32'))
|
| 136 |
-
pil_masks.save("test.
|
| 137 |
|
| 138 |
-
return outpix, overlay, flows, gr.DownloadButton(visible=True, value = "test.
|
| 139 |
|
| 140 |
# Gradio Interface
|
| 141 |
#iface = gr.Interface(
|
|
@@ -162,7 +162,7 @@ with gr.Blocks(title = "Hello",
|
|
| 162 |
img_outlines = gr.Image(label = "Output image", type = "pil")
|
| 163 |
img_overlay = gr.Image(label = "Output image", type = "numpy")
|
| 164 |
flows = gr.Image(label = "Output image", type = "numpy")
|
| 165 |
-
masks = gr.Image(label = "Output image", type = "numpy")
|
| 166 |
|
| 167 |
|
| 168 |
send_btn.click(fn=cellpose_segment, inputs=[input_image], outputs=[img_outlines, img_overlay, flows, down_btn])
|
|
|
|
| 133 |
#masks = Image.fromarray(255. * crand[masks])
|
| 134 |
|
| 135 |
pil_masks = Image.fromarray((masks/masks.max()).astype('float32'))
|
| 136 |
+
pil_masks.save("test.tiff")
|
| 137 |
|
| 138 |
+
return outpix, overlay, flows, gr.DownloadButton(visible=True, value = "test.tiff")
|
| 139 |
|
| 140 |
# Gradio Interface
|
| 141 |
#iface = gr.Interface(
|
|
|
|
| 162 |
img_outlines = gr.Image(label = "Output image", type = "pil")
|
| 163 |
img_overlay = gr.Image(label = "Output image", type = "numpy")
|
| 164 |
flows = gr.Image(label = "Output image", type = "numpy")
|
| 165 |
+
#masks = gr.Image(label = "Output image", type = "numpy")
|
| 166 |
|
| 167 |
|
| 168 |
send_btn.click(fn=cellpose_segment, inputs=[input_image], outputs=[img_outlines, img_overlay, flows, down_btn])
|