mouseland commited on
Commit
7513a75
·
verified ·
1 Parent(s): 05c95be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -255,8 +255,8 @@ def update_image(filepath):
255
  for f in filepath:
256
  print(f)
257
 
258
- im1 = gr.Image(label = "Outlines", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
259
- im2 = gr.Image(label = "Cellpose flows", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
260
 
261
  return filepath[-1] , im1, im2
262
 
@@ -268,8 +268,8 @@ def update_button(filepath):
268
 
269
  #b1 = gr.DownloadButton("Download masks as TIFF", visible=False)
270
  #b2 = gr.DownloadButton("Download outline image as PNG", visible=False)
271
- im1 = gr.Image(label = "Outlines", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
272
- im2 = gr.Image(label = "Cellpose flows", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
273
 
274
  return [filepath] , im1, im2
275
 
@@ -300,9 +300,9 @@ with gr.Blocks(title = "Hello",
300
  down_btn2 = gr.DownloadButton("Download outlines (PNG)", visible=False)
301
 
302
  with gr.Column(scale=2):
303
- img_outlines = gr.Image(label = "Outlines", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
304
  #img_overlay = gr.Image(label = "Overlay", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
305
- flows = gr.Image(label = "Cellpose flows", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
306
 
307
 
308
  sample_list = []
@@ -318,6 +318,7 @@ with gr.Blocks(title = "Hello",
318
 
319
  gr.HTML("""<h4 style="color:white;"> Notes:<br>
320
  <li>you can load and process single-image tifs, but they won't display in the input field above.
 
321
  <li>install Cellpose-SAM locally for full functionality.
322
  </h4>""")
323
 
 
255
  for f in filepath:
256
  print(f)
257
 
258
+ im1 = gr.Image(label = "Outlines", type = "pil", format = 'png', visible=False) #, width = "50vw", height = "20vw")
259
+ im2 = gr.Image(label = "Cellpose flows", type = "pil", format = 'png', visible=False) #, width = "50vw", height = "20vw")
260
 
261
  return filepath[-1] , im1, im2
262
 
 
268
 
269
  #b1 = gr.DownloadButton("Download masks as TIFF", visible=False)
270
  #b2 = gr.DownloadButton("Download outline image as PNG", visible=False)
271
+ im1 = gr.Image(label = "Outlines", type = "pil", format = 'png', visible=False) #, width = "50vw", height = "20vw")
272
+ im2 = gr.Image(label = "Cellpose flows", type = "pil", format = 'png', visible=False) #, width = "50vw", height = "20vw")
273
 
274
  return [filepath] , im1, im2
275
 
 
300
  down_btn2 = gr.DownloadButton("Download outlines (PNG)", visible=False)
301
 
302
  with gr.Column(scale=2):
303
+ img_outlines = gr.Image(label = "Outlines", type = "pil", format = 'png', visible=False) #, width = "50vw", height = "20vw")
304
  #img_overlay = gr.Image(label = "Overlay", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
305
+ flows = gr.Image(label = "Cellpose flows", type = "pil", format = 'png', visible=False) #, width = "50vw", height = "20vw")
306
 
307
 
308
  sample_list = []
 
318
 
319
  gr.HTML("""<h4 style="color:white;"> Notes:<br>
320
  <li>you can load and process single-image tifs, but they won't display in the input field above.
321
+ <li>you can load multiple files and download a zip of the segmentations
322
  <li>install Cellpose-SAM locally for full functionality.
323
  </h4>""")
324