Update app.py
Browse files
app.py
CHANGED
|
@@ -228,14 +228,14 @@ desc = "Pipeline: UNet -> mask lungs -> two binary classifiers (Normal vs Bacter
|
|
| 228 |
"If both classifiers fire, the stronger probability is chosen (fallback). Thresholds adjustable."
|
| 229 |
|
| 230 |
|
|
|
|
| 231 |
example_samples = [
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
]
|
| 236 |
|
| 237 |
with gr.Blocks(title=title) as demo:
|
| 238 |
-
|
| 239 |
gr.Markdown(f"### {title}")
|
| 240 |
gr.Markdown(desc)
|
| 241 |
|
|
@@ -259,16 +259,14 @@ with gr.Blocks(title=title) as demo:
|
|
| 259 |
|
| 260 |
gr.Markdown("### Test Samples")
|
| 261 |
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
gr.Image(img_path, width=150, show_label=False)
|
| 271 |
-
gr.Markdown(f"<center>{label}</center>")
|
| 272 |
|
| 273 |
if __name__ == "__main__":
|
| 274 |
demo.launch(share=False)
|
|
|
|
| 228 |
"If both classifiers fire, the stronger probability is chosen (fallback). Thresholds adjustable."
|
| 229 |
|
| 230 |
|
| 231 |
+
# Table data (Images embedded as HTML)
|
| 232 |
example_samples = [
|
| 233 |
+
['images/NORMAL.jpeg',"NORMAL"],
|
| 234 |
+
['images/VIRAL.jpeg',"VIRAL"],
|
| 235 |
+
['images/BACT.jpeg',"BACTERIAL"],
|
| 236 |
]
|
| 237 |
|
| 238 |
with gr.Blocks(title=title) as demo:
|
|
|
|
| 239 |
gr.Markdown(f"### {title}")
|
| 240 |
gr.Markdown(desc)
|
| 241 |
|
|
|
|
| 259 |
|
| 260 |
gr.Markdown("### Test Samples")
|
| 261 |
|
| 262 |
+
gr.Dataframe(
|
| 263 |
+
headers=["Image", "Label"],
|
| 264 |
+
value=example_samples,
|
| 265 |
+
interactive=False,
|
| 266 |
+
wrap=True,
|
| 267 |
+
row_count=(len(example_samples), "fixed"),
|
| 268 |
+
col_count=(2, "fixed")
|
| 269 |
+
)
|
|
|
|
|
|
|
| 270 |
|
| 271 |
if __name__ == "__main__":
|
| 272 |
demo.launch(share=False)
|