File size: 535 Bytes
94d373b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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)