Update app.py
Browse files
app.py
CHANGED
@@ -31,6 +31,24 @@ about_page = st.Page(
|
|
31 |
icon=":material/info:",
|
32 |
default=False)
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
# --- NAVIGATION SETUP ---
|
36 |
#pg = st.navigation(pages=[home_page, type_text_page, upload_file_page, about_page]) # WITHOUT SECTIONS
|
|
|
31 |
icon=":material/info:",
|
32 |
default=False)
|
33 |
|
34 |
+
# This is the key trick:
|
35 |
+
# 1. Define all content first
|
36 |
+
content = [f"This is scrollable content line {i}" for i in range(100)]
|
37 |
+
|
38 |
+
# 2. Display first part of content
|
39 |
+
for i in range(len(content) - 1):
|
40 |
+
st.write(content[i])
|
41 |
+
|
42 |
+
# 3. Add a placeholder for the last item
|
43 |
+
last_item = st.empty()
|
44 |
+
|
45 |
+
# 4. Show "Bottom Reached!" message to confirm we're at the bottom
|
46 |
+
st.success("Bottom of page reached!")
|
47 |
+
|
48 |
+
# 5. Finally, add the last content item
|
49 |
+
# This forces Streamlit to render the page up to the bottom
|
50 |
+
last_item.write(content[-1])
|
51 |
+
|
52 |
|
53 |
# --- NAVIGATION SETUP ---
|
54 |
#pg = st.navigation(pages=[home_page, type_text_page, upload_file_page, about_page]) # WITHOUT SECTIONS
|