Spaces:
Sleeping
Sleeping
| 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 | |
| ) |