georad commited on
Commit
4c05324
·
verified ·
1 Parent(s): 209e779

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -55
app.py CHANGED
@@ -1,39 +1,4 @@
1
  import streamlit as st
2
- import streamlit.components.v1 as components
3
-
4
- # At the top of file with imports
5
- def add_sticky_footer_css():
6
- st.markdown("""
7
- <style>
8
- /* Make Streamlit's stMainMenu button aqua */
9
- [data-testid="stMainMenu"] {
10
- background-color: #00FFFF;
11
- }
12
-
13
- /* Make Streamlit's status widget sticky */
14
- [data-testid="stStatusWidget"] {
15
- position: fixed;
16
- bottom: 0;
17
- right: 0;
18
- z-index: 1000;
19
- background-color: yellow; /* #90EE90 */
20
- padding: 5px;
21
- border-top: 1px solid #f0f0f0;
22
- width: 100%;
23
- }
24
-
25
- /* Add padding to main content to prevent overlap with fixed header */
26
- .main .block-container {
27
- padding-top: 5rem;
28
- padding-bottom: 3rem;
29
- }
30
- </style>
31
- """, unsafe_allow_html=True)
32
-
33
- # At the start of main function or execution flow
34
- # add_sticky_footer_css()
35
-
36
- # Rest of app continues...
37
 
38
  # --- PAGE SETUP ---
39
  type_text_page = st.Page(
@@ -42,7 +7,7 @@ type_text_page = st.Page(
42
  icon=":material/keyboard:",
43
  default=True,)
44
 
45
- # --- Your Streamlit App ---
46
  st.logo(image="images/menu_book_60dp_75FBFD.png")
47
  #st.title("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
48
  #st.title("Select specific Chapter (quicker)")
@@ -50,27 +15,8 @@ st.sidebar.header("SBS V2.0 mapper")
50
  st.sidebar.subheader("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
51
  st.sidebar.text("Select specific Chapter for quicker results")
52
  st.sidebar.text("Demo by JA-RAD (work in progress)")
53
- #st.sidebar.text("(work in progress)")
54
 
55
  # --- NAVIGATION SETUP ---
56
  pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS
57
  ##pg = st.navigation({"Chapter_Index": [start_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
58
  pg.run()
59
-
60
- # Add a dummy element at the bottom
61
- # st.markdown('<div id="bottom"></div>', unsafe_allow_html=True)
62
-
63
- # JavaScript to scroll the dummy element into view
64
- #scroll_script = """
65
- #<script>
66
- # document.addEventListener('DOMContentLoaded', function() {
67
- # const bottomElement = window.parent.document.getElementById('bottom');
68
- # if (bottomElement) {
69
- # bottomElement.scrollIntoView({ behavior: 'smooth', block: 'end' });
70
- # }
71
- # });
72
- #</script>
73
- #"""
74
-
75
- # Inject the script
76
- #components.html(scroll_script, height=0, width=0)
 
1
  import streamlit as st
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  # --- PAGE SETUP ---
4
  type_text_page = st.Page(
 
7
  icon=":material/keyboard:",
8
  default=True,)
9
 
10
+ # --- App captions ---
11
  st.logo(image="images/menu_book_60dp_75FBFD.png")
12
  #st.title("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
13
  #st.title("Select specific Chapter (quicker)")
 
15
  st.sidebar.subheader("Map descriptions to SBS codes with Sentence Transformer + Reasoning")
16
  st.sidebar.text("Select specific Chapter for quicker results")
17
  st.sidebar.text("Demo by JA-RAD (work in progress)")
 
18
 
19
  # --- NAVIGATION SETUP ---
20
  pg = st.navigation(pages=[type_text_page]) # WITHOUT SECTIONS
21
  ##pg = st.navigation({"Chapter_Index": [start_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
22
  pg.run()