Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,7 @@ import matplotlib.pyplot as plt
|
|
| 8 |
import os, io, base64
|
| 9 |
from PIL import Image
|
| 10 |
from cellpose.io import imread, imsave
|
|
|
|
| 11 |
|
| 12 |
from huggingface_hub import hf_hub_download
|
| 13 |
|
|
@@ -329,9 +330,11 @@ with gr.Blocks(title = "Hello",
|
|
| 329 |
flows = gr.Image(label = "Cellpose flows", type = "filepath", format = 'png', value = fp0) #, width = "50vw", height = "20vw")
|
| 330 |
|
| 331 |
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
|
|
|
|
|
|
| 335 |
|
| 336 |
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")
|
| 337 |
input_image.upload(update_button, input_image, [input_image, up_btn, outlines, flows])
|
|
|
|
| 8 |
import os, io, base64
|
| 9 |
from PIL import Image
|
| 10 |
from cellpose.io import imread, imsave
|
| 11 |
+
import glob
|
| 12 |
|
| 13 |
from huggingface_hub import hf_hub_download
|
| 14 |
|
|
|
|
| 330 |
flows = gr.Image(label = "Cellpose flows", type = "filepath", format = 'png', value = fp0) #, width = "50vw", height = "20vw")
|
| 331 |
|
| 332 |
|
| 333 |
+
|
| 334 |
+
sample_list = glob.glob("samples/*.png")
|
| 335 |
+
#sample_list = []
|
| 336 |
+
#for j in range(23):
|
| 337 |
+
# sample_list.append("samples/img%0.2d.png"%j)
|
| 338 |
|
| 339 |
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")
|
| 340 |
input_image.upload(update_button, input_image, [input_image, up_btn, outlines, flows])
|