Update pages/type_text.py
Browse files- pages/type_text.py +41 -1
pages/type_text.py
CHANGED
@@ -9,6 +9,47 @@ import time
|
|
9 |
import os
|
10 |
os.getenv("HF_TOKEN")
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
#hide_streamlit_style = """
|
13 |
# <style>
|
14 |
# div[data-testid="stHeader"] {
|
@@ -20,7 +61,6 @@ os.getenv("HF_TOKEN")
|
|
20 |
# """
|
21 |
#st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
22 |
|
23 |
-
#st.title(":blue[SBS V2.0 mapper] (work in progress)")
|
24 |
st.header("Map internal descriptions to SBS codes with Sentence Transformer + Reasoning Models")
|
25 |
st.subheader("Select specific Chapter for quicker results")
|
26 |
#df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows.csv")
|
|
|
9 |
import os
|
10 |
os.getenv("HF_TOKEN")
|
11 |
|
12 |
+
from streamlit_status import st_status
|
13 |
+
|
14 |
+
# Inject custom CSS to make the header sticky
|
15 |
+
st.markdown(
|
16 |
+
"""
|
17 |
+
<style>
|
18 |
+
div[data-testid="stVerticalBlock"] {
|
19 |
+
position: fixed;
|
20 |
+
top: 0;
|
21 |
+
left: 0;
|
22 |
+
right: 0;
|
23 |
+
background-color: white; /* Adjust to your header background color */
|
24 |
+
z-index: 1000; /* Ensure it's above other elements */
|
25 |
+
padding: 10px; /* Add some padding for spacing */
|
26 |
+
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* Optional: Add a subtle shadow */
|
27 |
+
}
|
28 |
+
</style>
|
29 |
+
""",
|
30 |
+
unsafe_allow_html=True,
|
31 |
+
)
|
32 |
+
|
33 |
+
# Create the header bar using columns
|
34 |
+
col1, col2, col3 = st.columns([1, 5, 1]) # Adjust column widths as needed
|
35 |
+
|
36 |
+
with col1:
|
37 |
+
st.image("images/your_logo.png", width=100) # Replace with your logo
|
38 |
+
|
39 |
+
with col2:
|
40 |
+
st.title(":blue[SBS V2.0 mapper] (work in progress)")
|
41 |
+
|
42 |
+
with col3:
|
43 |
+
status = st_status("Processing...", expanded=False)
|
44 |
+
|
45 |
+
st.write("---") # Add a separator below the header
|
46 |
+
|
47 |
+
# Your main content goes here
|
48 |
+
for i in range(50):
|
49 |
+
st.write(f"Some content here... {i}")
|
50 |
+
|
51 |
+
status.update(label="Complete!", state="complete", expanded=False)
|
52 |
+
|
53 |
#hide_streamlit_style = """
|
54 |
# <style>
|
55 |
# div[data-testid="stHeader"] {
|
|
|
61 |
# """
|
62 |
#st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
63 |
|
|
|
64 |
st.header("Map internal descriptions to SBS codes with Sentence Transformer + Reasoning Models")
|
65 |
st.subheader("Select specific Chapter for quicker results")
|
66 |
#df_chapters = pd.read_csv("SBS_V2_0/Chapter_Index_Rows.csv")
|