File size: 2,338 Bytes
25eb2b4
53dcb25
7b883db
 
 
 
 
 
 
 
 
866bcb2
 
7b883db
 
f93ba69
7b883db
 
 
 
 
 
f93ba69
 
7b883db
 
 
 
 
 
f93ba69
7b883db
1c7dd78
866bcb2
 
7b883db
122a897
7b883db
 
 
122a897
 
 
 
f93ba69
7b883db
 
 
e97685c
122a897
f93ba69
7b883db
 
f4ae373
 
 
 
f93ba69
 
f4ae373
 
 
f93ba69
7b883db
 
 
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
import streamlit as st

# --- Page Configuration ---
# This sets the title and icon that appear in the default header
st.set_page_config(
    page_title="SBS V2.0 mapper", # This title will appear in the sticky header
    page_icon=":material/keyboard:", # This icon can also appear in the header
    layout="wide" # Optional: Use wide layout
)

# --- Custom CSS for Sticky Default Header ---
st.markdown("""
<style>
    /* Make the default Streamlit header sticky */
    header {
        position: sticky;
        top: 0; /* Stick to the top edge */
        z-index: 100; /* Ensure the header is above other content */
        background-color: rgb(240, 242, 246); /* Match Streamlit's default header background color */
        /* Add padding if needed, though sticky often works well with default layout */
        /* padding-top: 1rem; */
        /* padding-bottom: 1rem; */
    }

    /* Optional: Add some padding to the top of the main content
               so it doesn't start hidden behind the sticky header */
    /* This might be handled automatically by position: sticky, but can help if needed */
    /*
    .stApp > div:first-child {
        padding-top: XXpx; // Replace XX with the height of your header
    }
    */
</style>
""", unsafe_allow_html=True)

# --- App Content (will scroll below the sticky header) ---

# The logo placed here will likely appear in the sidebar or main body,
# not in the sticky default header. Use st.set_page_config for the header icon.
st.logo(image="images/menu_book_60dp_75FBFD.png")

st.sidebar.header("SBS V2.0 mapper")
st.sidebar.write("(work in progress)")
st.sidebar.text("Demo by JA-RAD")

# Note: st.title and st.subheader here will appear *below* the sticky header,
# as they are part of the main app content flow.
st.title("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
st.subheader("Select specific Chapter for quicker results")


# --- NAVIGATION SETUP ---
# Keep your existing navigation setup
type_text_page = st.Page(
    page="pages/type_text.py",
    title="DEMO (work in progress)",
    icon=":material/keyboard:",
    default=True,
)

pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS
pg.run()

# Add some extra content to make the page scrollable for testing
for i in range(50):
    st.write(f"This is scrollable content line {i}")