georad commited on
Commit
70df504
·
verified ·
1 Parent(s): e30af7a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -36,4 +36,17 @@ about_page = st.Page(
36
  #pg = st.navigation(pages=[home_page, type_text_page, upload_file_page, about_page]) # WITHOUT SECTIONS
37
  pg = st.navigation({"Home": [home_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
38
 
39
- pg.run()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  #pg = st.navigation(pages=[home_page, type_text_page, upload_file_page, about_page]) # WITHOUT SECTIONS
37
  pg = st.navigation({"Home": [home_page], "Demo": [type_text_page, upload_file_page], "About": [about_page]}) # WITH SECTIONS
38
 
39
+ pg.run()
40
+
41
+ # JavaScript to scroll to the bottom
42
+ scroll_script = """
43
+ <script>
44
+ var body = window.parent.document.querySelector(".main");
45
+ if (body) {
46
+ body.scrollTop = body.scrollHeight;
47
+ }
48
+ </script>
49
+ """
50
+
51
+ # Inject the script
52
+ components.html(scroll_script, height=0, width=0)