georad commited on
Commit
dbb0d31
·
verified ·
1 Parent(s): 04c7b8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -16
app.py CHANGED
@@ -1,12 +1,12 @@
1
  import streamlit as st
2
 
3
  # Inspect the header element, go to the "Computed" tab in styles, and find its height.
4
- HEADER_HEIGHT = "60px" # EXAMPLE: Adjust this (e.g., "56px", "4rem")
5
- HEADER_SELECTOR = 'header[data-testid="stHeader"]'
6
 
7
  # ---- SELECTOR FOR THE MAIN CONTENT AREA THAT NEEDS PADDING ----
8
  # Target the first direct div child of the stAppViewContainer which often holds the main scrollable content
9
- MAIN_CONTENT_SELECTOR = 'section[data-testid="stMain"]'
10
  #MAIN_CONTENT_SELECTOR = 'section[data-testid="stMain"] > div:nth-child(1)'
11
  #MAIN_CONTENT_SELECTOR = 'section[data-testid="stMainBlockContainer"]'
12
  #MAIN_CONTENT_SELECTOR = 'section[data-testid="stAppViewContainer"]'
@@ -16,7 +16,7 @@ MAIN_CONTENT_SELECTOR = 'section[data-testid="stMain"]'
16
  # Or, very commonly, Streamlit wraps main content in a div with class "block-container":
17
  #MAIN_CONTENT_SELECTOR = 'section[data-testid="stAppViewContainer"] .block-container'
18
  #MAIN_CONTENT_SELECTOR = '.main .block-container' # A more general selector for block-container
19
-
20
  custom_css = f"""
21
  <style>
22
  /* Making the Streamlit header sticky */
@@ -50,22 +50,12 @@ custom_css = f"""
50
  #*/
51
  </style>
52
  """
53
-
54
 
55
 
56
 
57
  # Inject CSS as early as possible in your app
58
- st.markdown(custom_css, unsafe_allow_html=True)
59
-
60
-
61
- # --- Your Streamlit App ---
62
- #st.logo(image="images/menu_book_60dp_75FBFD.png")
63
- st.title("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
64
- st.subheader("Select specific Chapter for quicker results")
65
- st.logo(image="images/menu_book_60dp_75FBFD.png")
66
- st.sidebar.header("SBS V2.0 mapper")
67
- st.sidebar.write("(work in progress)")
68
- st.sidebar.text("Demo by JA-RAD")
69
 
70
  # --- PAGE SETUP ---
71
  type_text_page = st.Page(
@@ -74,6 +64,18 @@ type_text_page = st.Page(
74
  icon=":material/keyboard:",
75
  default=True,)
76
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  # --- NAVIGATION SETUP ---
78
  #pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS
79
  ##pg = st.navigation({"Chapter_Index": [start_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
@@ -81,5 +83,11 @@ type_text_page = st.Page(
81
 
82
 
83
  if __name__ == "__main__":
 
 
 
 
 
 
84
  pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS
85
  pg.run()
 
1
  import streamlit as st
2
 
3
  # Inspect the header element, go to the "Computed" tab in styles, and find its height.
4
+ #HEADER_HEIGHT = "60px" # EXAMPLE: Adjust this (e.g., "56px", "4rem")
5
+ #HEADER_SELECTOR = 'header[data-testid="stHeader"]'
6
 
7
  # ---- SELECTOR FOR THE MAIN CONTENT AREA THAT NEEDS PADDING ----
8
  # Target the first direct div child of the stAppViewContainer which often holds the main scrollable content
9
+ #MAIN_CONTENT_SELECTOR = 'section[data-testid="stMain"]'
10
  #MAIN_CONTENT_SELECTOR = 'section[data-testid="stMain"] > div:nth-child(1)'
11
  #MAIN_CONTENT_SELECTOR = 'section[data-testid="stMainBlockContainer"]'
12
  #MAIN_CONTENT_SELECTOR = 'section[data-testid="stAppViewContainer"]'
 
16
  # Or, very commonly, Streamlit wraps main content in a div with class "block-container":
17
  #MAIN_CONTENT_SELECTOR = 'section[data-testid="stAppViewContainer"] .block-container'
18
  #MAIN_CONTENT_SELECTOR = '.main .block-container' # A more general selector for block-container
19
+ '''
20
  custom_css = f"""
21
  <style>
22
  /* Making the Streamlit header sticky */
 
50
  #*/
51
  </style>
52
  """
53
+ '''
54
 
55
 
56
 
57
  # Inject CSS as early as possible in your app
58
+ #st.markdown(custom_css, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
59
 
60
  # --- PAGE SETUP ---
61
  type_text_page = st.Page(
 
64
  icon=":material/keyboard:",
65
  default=True,)
66
 
67
+
68
+ # --- Your Streamlit App ---
69
+ #st.logo(image="images/menu_book_60dp_75FBFD.png")
70
+ #st.title("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
71
+ #st.subheader("Select specific Chapter for quicker results")
72
+ #st.logo(image="images/menu_book_60dp_75FBFD.png")
73
+ #t.sidebar.header("SBS V2.0 mapper")
74
+ #st.sidebar.write("(work in progress)")
75
+ #t.sidebar.text("Demo by JA-RAD")
76
+
77
+
78
+
79
  # --- NAVIGATION SETUP ---
80
  #pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS
81
  ##pg = st.navigation({"Chapter_Index": [start_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
 
83
 
84
 
85
  if __name__ == "__main__":
86
+ st.title("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
87
+ st.subheader("Select specific Chapter for quicker results")
88
+ st.logo(image="images/menu_book_60dp_75FBFD.png")
89
+ st.sidebar.header("SBS V2.0 mapper")
90
+ st.sidebar.write("(work in progress)")
91
+ st.sidebar.text("Demo by JA-RAD")
92
  pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS
93
  pg.run()