Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -54,15 +54,15 @@ PROJECT_MD = r"""
|
|
| 54 |
# 🧠 AD-Stage-Net: Four-Stage Alzheimer’s MRI Classification
|
| 55 |
|
| 56 |
This demo runs strong single CNN backbones (and an optional 2-model ensemble) to classify brain MRI slices into four stages:
|
| 57 |
-
- No Impairment**
|
| 58 |
-
- Very Mild Impairment
|
| 59 |
-
- Mild Impairment
|
| 60 |
-
- Moderate Impairment
|
| 61 |
-
|
| 62 |
-
**Code:** <https://github.com/katelynhur/AD-Stage-Net>
|
| 63 |
-
**Data sources:**
|
| 64 |
-
- Kaggle (Luke Chugh): <https://www.kaggle.com/datasets/lchugh1/alzheimers-mri-dataset>
|
| 65 |
-
- Kaggle (Marco Pinamonti): <https://www.kaggle.com/datasets/marcopeix/alzheimer-mri-dataset>
|
| 66 |
- HuggingFace (Falah): <https://huggingface.co/datasets/fahadalhuzali/brain-MRI-ad-classification>
|
| 67 |
|
| 68 |
> ⚠️ For research only; not a medical device.
|
|
@@ -473,12 +473,12 @@ def run_infer(files, model1, model2, ckpt_map_json):
|
|
| 473 |
# singles_tbl = load_best_singles_table(LEADER_CSV)
|
| 474 |
# pairs_tbl = load_best_pairs_table()
|
| 475 |
|
| 476 |
-
#
|
| 477 |
-
#
|
| 478 |
-
#
|
| 479 |
-
#
|
| 480 |
-
#
|
| 481 |
-
#
|
| 482 |
|
| 483 |
# with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
| 484 |
# gr.Markdown(PROJECT_MD)
|
|
@@ -533,20 +533,44 @@ def build_app():
|
|
| 533 |
singles_tbl = load_best_singles_table(LEADER_CSV)
|
| 534 |
pairs_tbl = load_best_pairs_table()
|
| 535 |
|
| 536 |
-
# The updated CSS to force the text to be white
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 537 |
css = """
|
| 538 |
.gradio-container {
|
| 539 |
background-color: #12192E !important;
|
| 540 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 541 |
|
| 542 |
-
|
| 543 |
-
.gradio-container p,
|
| 544 |
-
.gradio-container .label,
|
| 545 |
-
.gradio-container .gr-markdown *,
|
| 546 |
.gradio-container .gr-label-text,
|
| 547 |
.gradio-container .gr-radio-label {
|
| 548 |
color: white !important;
|
| 549 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 550 |
"""
|
| 551 |
|
| 552 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
|
|
| 54 |
# 🧠 AD-Stage-Net: Four-Stage Alzheimer’s MRI Classification
|
| 55 |
|
| 56 |
This demo runs strong single CNN backbones (and an optional 2-model ensemble) to classify brain MRI slices into four stages:
|
| 57 |
+
- **No Impairment**
|
| 58 |
+
- **Very Mild Impairment**
|
| 59 |
+
- **Mild Impairment**
|
| 60 |
+
- **Moderate Impairment**
|
| 61 |
+
|
| 62 |
+
**Code:** <https://github.com/katelynhur/AD-Stage-Net>
|
| 63 |
+
**Data sources:**
|
| 64 |
+
- Kaggle (Luke Chugh): <https://www.kaggle.com/datasets/lchugh1/alzheimers-mri-dataset>
|
| 65 |
+
- Kaggle (Marco Pinamonti): <https://www.kaggle.com/datasets/marcopeix/alzheimer-mri-dataset>
|
| 66 |
- HuggingFace (Falah): <https://huggingface.co/datasets/fahadalhuzali/brain-MRI-ad-classification>
|
| 67 |
|
| 68 |
> ⚠️ For research only; not a medical device.
|
|
|
|
| 473 |
# singles_tbl = load_best_singles_table(LEADER_CSV)
|
| 474 |
# pairs_tbl = load_best_pairs_table()
|
| 475 |
|
| 476 |
+
# css = """
|
| 477 |
+
# .gradio-container { background-color: #12192E !important; }
|
| 478 |
+
# .gradio-container h1, .gradio-container p, .gradio-container .label, .gradio-container .gr-markdown, .gradio-container .gr-label-text {
|
| 479 |
+
# color: white !important;
|
| 480 |
+
# }
|
| 481 |
+
# """
|
| 482 |
|
| 483 |
# with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
| 484 |
# gr.Markdown(PROJECT_MD)
|
|
|
|
| 533 |
singles_tbl = load_best_singles_table(LEADER_CSV)
|
| 534 |
pairs_tbl = load_best_pairs_table()
|
| 535 |
|
| 536 |
+
# # The updated CSS to force the text to be white
|
| 537 |
+
# css = """
|
| 538 |
+
# .gradio-container {
|
| 539 |
+
# background-color: #12192E !important;
|
| 540 |
+
# }
|
| 541 |
+
|
| 542 |
+
# .gradio-container h1,
|
| 543 |
+
# .gradio-container p,
|
| 544 |
+
# .gradio-container .label,
|
| 545 |
+
# .gradio-container .gr-markdown *,
|
| 546 |
+
# .gradio-container .gr-label-text,
|
| 547 |
+
# .gradio-container .gr-radio-label {
|
| 548 |
+
# color: white !important;
|
| 549 |
+
# }
|
| 550 |
+
# """
|
| 551 |
+
|
| 552 |
css = """
|
| 553 |
.gradio-container {
|
| 554 |
background-color: #12192E !important;
|
| 555 |
}
|
| 556 |
+
|
| 557 |
+
/* Force all text elements inside the markdown to be white */
|
| 558 |
+
.gradio-container .gr-markdown * {
|
| 559 |
+
color: white !important;
|
| 560 |
+
}
|
| 561 |
|
| 562 |
+
/* Ensure the labels for the dropdowns are also white */
|
|
|
|
|
|
|
|
|
|
| 563 |
.gradio-container .gr-label-text,
|
| 564 |
.gradio-container .gr-radio-label {
|
| 565 |
color: white !important;
|
| 566 |
}
|
| 567 |
+
|
| 568 |
+
/* Revert the text color for the input/output boxes to black */
|
| 569 |
+
.gradio-container .gr-input,
|
| 570 |
+
.gradio-container .gr-output,
|
| 571 |
+
.gradio-container .gr-button {
|
| 572 |
+
color: black !important;
|
| 573 |
+
}
|
| 574 |
"""
|
| 575 |
|
| 576 |
with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|