Spaces:
Sleeping
Sleeping
Commit
·
bc50c42
1
Parent(s):
e96f8c6
Update app.py
Browse files
app.py
CHANGED
@@ -77,27 +77,7 @@ with gr.Blocks(css=css) as app:
|
|
77 |
with gr.Tabs():
|
78 |
with gr.TabItem("Image upload and detections visualization"):
|
79 |
with gr.Row():
|
80 |
-
|
81 |
-
with gr.Row():
|
82 |
-
img_input = gr.Image(type="pil")
|
83 |
-
img_input_mask = gr.Image(type="pil", visible=False)
|
84 |
-
with gr.Row():
|
85 |
-
example_images = gr.Dataset(
|
86 |
-
components=[img_input, img_input_mask],
|
87 |
-
samples=[
|
88 |
-
[path.as_posix(), path.as_posix().replace("_HE", "_mask")]
|
89 |
-
for path in sorted(
|
90 |
-
pathlib.Path("cd45rb_test_imgs").rglob("*_HE.png")
|
91 |
-
)
|
92 |
-
],
|
93 |
-
samples_per_page=2,
|
94 |
-
)
|
95 |
-
with gr.Row():
|
96 |
-
with gr.Column():
|
97 |
-
gr.Markdown(
|
98 |
-
"""The selected image with detected bounding boxes by the model"""
|
99 |
-
)
|
100 |
-
img_output_from_upload = gr.Image(shape=(800, 800))
|
101 |
with gr.Column():
|
102 |
with gr.Row():
|
103 |
experiment_type = gr.Dropdown(
|
@@ -182,6 +162,29 @@ with gr.Blocks(css=css) as app:
|
|
182 |
with gr.Row():
|
183 |
detect_button = gr.Button("Detect leukocytes")
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
with gr.TabItem("Attentions visualization"):
|
186 |
gr.Markdown("""Encoder attentions""")
|
187 |
with gr.Row():
|
|
|
77 |
with gr.Tabs():
|
78 |
with gr.TabItem("Image upload and detections visualization"):
|
79 |
with gr.Row():
|
80 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
with gr.Column():
|
82 |
with gr.Row():
|
83 |
experiment_type = gr.Dropdown(
|
|
|
162 |
with gr.Row():
|
163 |
detect_button = gr.Button("Detect leukocytes")
|
164 |
|
165 |
+
with gr.Column():
|
166 |
+
with gr.Row():
|
167 |
+
img_input = gr.Image(type="pil")
|
168 |
+
img_input_mask = gr.Image(type="pil", visible=False)
|
169 |
+
with gr.Row():
|
170 |
+
example_images = gr.Dataset(
|
171 |
+
components=[img_input, img_input_mask],
|
172 |
+
samples=[
|
173 |
+
[path.as_posix(), path.as_posix().replace("_HE", "_mask")]
|
174 |
+
for path in sorted(
|
175 |
+
pathlib.Path("cd45rb_test_imgs").rglob("*_HE.png")
|
176 |
+
)
|
177 |
+
],
|
178 |
+
samples_per_page=2,
|
179 |
+
)
|
180 |
+
with gr.Row():
|
181 |
+
with gr.Column():
|
182 |
+
gr.Markdown(
|
183 |
+
"""The selected image with detected bounding boxes by the model"""
|
184 |
+
)
|
185 |
+
img_output_from_upload = gr.Image(shape=(800, 800))
|
186 |
+
|
187 |
+
|
188 |
with gr.TabItem("Attentions visualization"):
|
189 |
gr.Markdown("""Encoder attentions""")
|
190 |
with gr.Row():
|