Spaces:
Sleeping
Sleeping
| # components.py | |
| import streamlit as st | |
| def apply_styles(): | |
| """ | |
| Applies CSS styles to the Streamlit app from an external file. | |
| """ | |
| with open(r'./static/styles.css') as f: | |
| st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True) | |
| def add_header(title): | |
| """ | |
| Adds a header to the page. | |
| """ | |
| st.markdown(f"<h1>{title}</h1>", unsafe_allow_html=True) | |
| def add_footer(text): | |
| """ | |
| Adds a footer to the page. | |
| """ | |
| st.markdown(f"<footer>{text}</footer>", unsafe_allow_html=True) |