Spaces:
Runtime error
Runtime error
polejowska
commited on
Commit
•
e0cd57b
1
Parent(s):
d24bef6
Update app.py
Browse files
app.py
CHANGED
@@ -82,6 +82,18 @@ with gr.Blocks(css=css) as app:
|
|
82 |
with gr.Column():
|
83 |
img_input = gr.Image(type="pil")
|
84 |
img_input_mask = gr.Image(type="pil", visible=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
with gr.Column():
|
86 |
options = gr.Dropdown(
|
87 |
value=MODELS_NAMES[0],
|
@@ -89,27 +101,15 @@ with gr.Blocks(css=css) as app:
|
|
89 |
label="Select an object detection model",
|
90 |
show_label=True,
|
91 |
)
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
detect_button = gr.Button("Detect leukocytes")
|
102 |
-
with gr.Row():
|
103 |
-
example_images = gr.Dataset(
|
104 |
-
components=[img_input, img_input_mask],
|
105 |
-
samples=[
|
106 |
-
[path.as_posix(), path.as_posix().replace("_HE", "_mask")]
|
107 |
-
for path in sorted(
|
108 |
-
pathlib.Path("cd45rb_test_imgs").rglob("*_HE.png")
|
109 |
-
)
|
110 |
-
],
|
111 |
-
samples_per_page=2,
|
112 |
-
)
|
113 |
with gr.Row():
|
114 |
with gr.Column():
|
115 |
gr.Markdown(
|
|
|
82 |
with gr.Column():
|
83 |
img_input = gr.Image(type="pil")
|
84 |
img_input_mask = gr.Image(type="pil", visible=False)
|
85 |
+
with gr.Column():
|
86 |
+
example_images = gr.Dataset(
|
87 |
+
components=[img_input, img_input_mask],
|
88 |
+
samples=[
|
89 |
+
[path.as_posix(), path.as_posix().replace("_HE", "_mask")]
|
90 |
+
for path in sorted(
|
91 |
+
pathlib.Path("cd45rb_test_imgs").rglob("*_HE.png")
|
92 |
+
)
|
93 |
+
],
|
94 |
+
samples_per_page=2,
|
95 |
+
)
|
96 |
+
with gr.Row():
|
97 |
with gr.Column():
|
98 |
options = gr.Dropdown(
|
99 |
value=MODELS_NAMES[0],
|
|
|
101 |
label="Select an object detection model",
|
102 |
show_label=True,
|
103 |
)
|
104 |
+
with gr.Column():
|
105 |
+
slider_input = gr.Slider(
|
106 |
+
minimum=0.2, maximum=1, value=0.7, label="Prediction threshold"
|
107 |
+
)
|
108 |
+
with gr.Column():
|
109 |
+
display_mask = gr.Checkbox(
|
110 |
+
label="Display masks", default=False
|
111 |
+
)
|
112 |
+
detect_button = gr.Button("Detect leukocytes")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
with gr.Row():
|
114 |
with gr.Column():
|
115 |
gr.Markdown(
|