Spaces:
Sleeping
Sleeping
File size: 3,077 Bytes
1114e61 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | import streamlit as st
import os
import base64
def load_image_as_base64(image_path):
repo_root = os.path.dirname(os.path.abspath(__file__))
image_path = os.path.join(repo_root, image_path)
with open(image_path, "rb") as f:
data = f.read()
return base64.b64encode(data).decode()
# Read image and encode in base64
img_as_base64 = load_image_as_base64(os.path.join("img", "GVHD-Intel-logo.png"))
logo_as_base64 = load_image_as_base64(os.path.join("img", "GVHD-Orgs-logo.png"))
st.set_page_config(page_title="GVHD Predictions", layout="wide")
# --- Flexible Footer CSS ---
st.markdown(
"""
<style>
/* Make the main Streamlit container use flex layout */
.stApp {
display: flex;
flex-direction: column;
min-height: 100vh; /* full viewport height */
}
/* Content grows naturally */
.main-content {
flex: 1;
}
/* Footer styling */
.footer {
margin-top: auto; /* pushes footer to bottom */
text-align: center;
font-size: 14px;
color: grey;
opacity: 0.8;
padding: 10px 5px;
line-height: 1.4;
}
/* Responsive adjustments for mobile */
@media (max-width: 600px) {
.footer {
font-size: 12px;
padding: 8px 5px;
}
}
</style>
""",
unsafe_allow_html=True
)
# --- MAIN CONTENT ---
st.markdown('<div class="main-content">', unsafe_allow_html=True)
# add GVHD logo
st.markdown(
f"""
<div style="text-align:center">
<img src="data:image/png;base64,{img_as_base64}" style="width:50%; max-width:800px;">
</div>
""",
unsafe_allow_html=True
)
# add GVHD tagline
st.markdown("""
<div style="text-align:center">
<h3>
A modular prediction framework for Acute & Chronic GVHD risk assessment.<br>
<i>Predict. Learn. Adapt.</i>
</h3>
</div>
""", unsafe_allow_html=True)
# --- Partners Section ---
st.divider()
st.subheader("Partners:")
st.markdown(
f"""
<div style="text-align:center">
<img src="data:image/png;base64,{logo_as_base64}" style="width:100%; max-width:1000px;">
</div>
""",
unsafe_allow_html=True
)
# --- Disclaimer Section ---
st.divider()
st.write(
"""
**Disclaimer: Experimental research platform — not approved for clinical use.**\\
Modular AI-driven framework that centers can retrain with their own multi-center datasets to build and validate population-specific GVHD prediction models.\\
Model performance varies by training data and updates.
""")
st.markdown('</div>', unsafe_allow_html=True)
# --- End of MAIN CONTENT ---
# --- Footer ---
st.markdown(
"""
<div class="footer">
<br>
<br>
©2025 Department of Health – Abu Dhabi<br>
Partnership: SSMC (PureHealth) & MBZUAI<br>
Data Collaborators: SKMC, Tawam Hospital, KHCC (Jordan)
</div>
""",
unsafe_allow_html=True
) |