Spaces:
Runtime error
Runtime error
polejowska
commited on
Commit
•
9abbc70
1
Parent(s):
cb1656e
Update app.py
Browse files
app.py
CHANGED
@@ -80,6 +80,7 @@ with gr.Blocks(css=css) as app:
|
|
80 |
with gr.Row():
|
81 |
with gr.Column():
|
82 |
img_input = gr.Image(type="pil")
|
|
|
83 |
with gr.Column():
|
84 |
options = gr.Dropdown(
|
85 |
value=MODELS_NAMES[0],
|
@@ -99,9 +100,9 @@ with gr.Blocks(css=css) as app:
|
|
99 |
detect_button = gr.Button("Detect leukocytes")
|
100 |
with gr.Row():
|
101 |
example_images = gr.Dataset(
|
102 |
-
components=[img_input],
|
103 |
samples=[
|
104 |
-
[path.as_posix()]
|
105 |
for path in sorted(
|
106 |
pathlib.Path("cd45rb_test_imgs").rglob("*_HE.png")
|
107 |
)
|
@@ -143,3 +144,4 @@ with gr.Blocks(css=css) as app:
|
|
143 |
fn=set_example_image, inputs=[example_images], outputs=[img_input]
|
144 |
)
|
145 |
|
|
|
|
80 |
with gr.Row():
|
81 |
with gr.Column():
|
82 |
img_input = gr.Image(type="pil")
|
83 |
+
img_input_mask = gr.Image(type="pil", visible=False)
|
84 |
with gr.Column():
|
85 |
options = gr.Dropdown(
|
86 |
value=MODELS_NAMES[0],
|
|
|
100 |
detect_button = gr.Button("Detect leukocytes")
|
101 |
with gr.Row():
|
102 |
example_images = gr.Dataset(
|
103 |
+
components=[img_input, img_input_mask],
|
104 |
samples=[
|
105 |
+
[path.as_posix(), path.as_posix().replace("_HE", "_mask")]
|
106 |
for path in sorted(
|
107 |
pathlib.Path("cd45rb_test_imgs").rglob("*_HE.png")
|
108 |
)
|
|
|
144 |
fn=set_example_image, inputs=[example_images], outputs=[img_input]
|
145 |
)
|
146 |
|
147 |
+
app.launch(enable_queue=True)
|