Update app.py
Browse files7 unmodified lines8910111213315 unmodified lines3293303313323333343353363377 unmodified linesimport os, io, base64from PIL import Imagefrom cellpose.io import imread, imsavefrom huggingface_hub import hf_hub_download315 unmodified linesflows = gr.Image(label = "Cellpose flows", type = "filepath", format = 'png', value = fp0) #, width = "50vw", height = "20vw")sample_list = []for j in range(23):sample_list.append("samples/img%0.2d.png"%j)gr.Examples(sample_list, fn = update_button, inputs=input_image, outputs = [input_image, up_btn, outlines, flows], examples_per_page=25, label = "Click on an example to try it")input_image.upload(update_button, input_image, [input_image, up_btn, outlines, flows])7 unmodified lines891011121314315 unmodified lines3303313323333343353363373383393407 unmodified linesimport os, io, base64from PIL import Imagefrom cellpose.io import imread, imsaveimport globfrom huggingface_hub import hf_hub_download315 unmodified linesflows = gr.Image(label = "Cellpose flows", type = "filepath", format = 'png', value = fp0) #, width = "50vw", height = "20vw")sample_list = glob.glob("samples/*.png")#sample_list = []#for j in range(23):# sample_list.append("samples/img%0.2d.png"%j)gr.Examples(sample_list, fn = update_button, inputs=input_image, outputs = [input_image, up_btn, outlines, flows], examples_per_page=25, label = "Click on an example to try it")input_image.upload(update_button, input_image, [input_image, up_btn, outlines, flows])
app.py+6-3