mouseland commited on
Commit
03ae964
·
verified ·
1 Parent(s): 98cbb92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -269,33 +269,36 @@ with gr.Blocks(title = "Hello",
269
  with gr.Row():
270
  with gr.Column(scale=2):
271
  gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:white;">Cellpose-SAM for cellular segmentation</div>""")
272
- gr.HTML("""<h4 style="color:white;">You may need to refresh/login for 5 minutes of free GPU compute/day. </h4>""")
273
- gr.HTML("""<h4 style="color:white;">"pip install cellpose" for full functionality. </h4>""")
274
-
275
  input_image = gr.Image(label = "Input", type = "filepath")
276
 
277
  with gr.Row():
278
  with gr.Column(scale=1):
279
  resize = gr.Number(label = 'max resize', value = 1000)
280
- gr.HTML("""<h4 style="color:white;"> Note1: you can load and process tifs, but they won't display in the input field above. </h4>""")
281
  #gr.HTML("""<h4 style="color:white;"> Note2: Only the first image of a tif will display the segmentations, but you can download segmentations for all planes. </h4>""")
282
 
283
  #filepath = gr.UploadButton("Upload (png, jpg, tif etc)", visible=True, file_count = "single")
284
 
 
285
  with gr.Column(scale=1):
286
  send_btn = gr.Button("Run Cellpose-SAM")
287
  down_btn = gr.DownloadButton("Download masks (TIF)", visible=False)
288
  down_btn2 = gr.DownloadButton("Download outlines (PNG)", visible=False)
289
 
 
 
 
 
 
 
290
  with gr.Column(scale=2):
291
  img_outlines = gr.Image(label = "Outlines", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
292
  img_overlay = gr.Image(label = "Overlay", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
293
  flows = gr.Image(label = "Cellpose flows", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
294
 
295
 
296
- with gr.Row():
297
- gr.HTML("""<a style="color:white;" href="https://github.com/MouseLand/cellpose" target="_blank">github page for cellpose</a>""")
298
- gr.HTML("""<a style="color:white;" href="https://github.com/MouseLand/cellpose" target="_blank">Cellpose-SAM paper</a>""")
299
 
300
  sample_list = []
301
  for j in range(23):
 
269
  with gr.Row():
270
  with gr.Column(scale=2):
271
  gr.HTML("""<div style="font-family:'Times New Roman', 'Serif'; font-size:16pt; font-weight:bold; text-align:center; color:white;">Cellpose-SAM for cellular segmentation</div>""")
272
+ gr.HTML("""<h4 style="color:white;">You may need to login/refresh for 5 minutes of free GPU compute per day (enough to process hundreds of images). </h4>""")
273
+
 
274
  input_image = gr.Image(label = "Input", type = "filepath")
275
 
276
  with gr.Row():
277
  with gr.Column(scale=1):
278
  resize = gr.Number(label = 'max resize', value = 1000)
279
+ gr.HTML("""<h4 style="color:white;"> Notes:<br> <li>you can load and process tifs, but they won't display in the input field above. </h4>""")
280
  #gr.HTML("""<h4 style="color:white;"> Note2: Only the first image of a tif will display the segmentations, but you can download segmentations for all planes. </h4>""")
281
 
282
  #filepath = gr.UploadButton("Upload (png, jpg, tif etc)", visible=True, file_count = "single")
283
 
284
+
285
  with gr.Column(scale=1):
286
  send_btn = gr.Button("Run Cellpose-SAM")
287
  down_btn = gr.DownloadButton("Download masks (TIF)", visible=False)
288
  down_btn2 = gr.DownloadButton("Download outlines (PNG)", visible=False)
289
 
290
+ gr.HTML("""<h4 style="color:white;">Install Cellpose-SAM locally for full functionality. </h4>""")
291
+ with gr.Row():
292
+ gr.HTML("""<a style="color:white; font-size:10pt;" href="https://github.com/MouseLand/cellpose" target="_blank">Github page</a>""")
293
+ gr.HTML("""<a style="color:white; font-size:10pt;" href="https://github.com/MouseLand/cellpose" target="_blank">Paper</a>""")
294
+
295
+
296
  with gr.Column(scale=2):
297
  img_outlines = gr.Image(label = "Outlines", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
298
  img_overlay = gr.Image(label = "Overlay", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
299
  flows = gr.Image(label = "Cellpose flows", type = "pil", format = 'png') #, width = "50vw", height = "20vw")
300
 
301
 
 
 
 
302
 
303
  sample_list = []
304
  for j in range(23):