Update app.py
Browse files
app.py
CHANGED
@@ -1,35 +1,34 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
-
#
|
4 |
-
|
5 |
-
<style>
|
6 |
-
/* Basic sticky header */
|
7 |
-
header[data-testid="stHeader"] {
|
8 |
-
position: sticky;
|
9 |
-
top: 0;
|
10 |
-
background-color: #90EE90;
|
11 |
-
z-index: 999;
|
12 |
-
height: auto;
|
13 |
-
}
|
14 |
-
</style>
|
15 |
-
""", unsafe_allow_html=True)
|
16 |
|
17 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
type_text_page = st.Page(
|
19 |
page="pages/type_text.py",
|
20 |
title="DEMO (work in progress)",
|
21 |
icon=":material/keyboard:",
|
22 |
default=True,)
|
23 |
|
24 |
-
|
25 |
-
st.title("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
|
26 |
-
st.subheader("Select specific Chapter for quicker results")
|
27 |
-
st.logo(image="images/menu_book_60dp_75FBFD.png")
|
28 |
-
st.sidebar.header("SBS V2.0 mapper")
|
29 |
-
st.sidebar.write("(work in progress)")
|
30 |
-
st.sidebar.text("Demo by JA-RAD")
|
31 |
-
|
32 |
-
# --- NAVIGATION SETUP ---
|
33 |
-
pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS
|
34 |
pg.run()
|
35 |
-
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
+
# Remove any previous custom CSS styles
|
4 |
+
# Keep the original app structure but add a custom sticky header
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
# Create a placeholder for the sticky header
|
7 |
+
header_placeholder = st.empty()
|
8 |
+
|
9 |
+
# Use the placeholder to create a container with basic styling
|
10 |
+
with header_placeholder.container():
|
11 |
+
st.markdown("""
|
12 |
+
<div style="background-color: #90EE90; padding: 10px; border-bottom: 1px solid #ccc;">
|
13 |
+
<h1>Map descriptions to SBS codes with Sentence Transformer + Reasoning</h1>
|
14 |
+
<h3>Select specific Chapter for quicker results</h3>
|
15 |
+
</div>
|
16 |
+
""", unsafe_allow_html=True)
|
17 |
+
|
18 |
+
# You can still use st.logo but it might not appear in the custom header
|
19 |
+
# st.logo(image="images/menu_book_60dp_75FBFD.png") # Place this outside the header
|
20 |
+
|
21 |
+
# Rest of your app works as normal
|
22 |
+
st.sidebar.header("SBS V2.0 mapper")
|
23 |
+
st.sidebar.write("(work in progress)")
|
24 |
+
st.sidebar.text("Demo by JA-RAD")
|
25 |
+
|
26 |
+
# Your page setup and navigation
|
27 |
type_text_page = st.Page(
|
28 |
page="pages/type_text.py",
|
29 |
title="DEMO (work in progress)",
|
30 |
icon=":material/keyboard:",
|
31 |
default=True,)
|
32 |
|
33 |
+
pg = st.navigation(pages=[type_text_page])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
pg.run()
|
|