Mpavan45 commited on
Commit
b61fdf3
·
verified ·
1 Parent(s): 41de2ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -42,18 +42,18 @@ elif page == "NLP Techniques":
42
  """)
43
 
44
  # Pagination buttons
45
- if st.button("Previous Page"):
46
- if page == "NLP Techniques":
47
- st.experimental_set_query_params(page="Introduction to NLP")
48
-
49
- if st.button("Next Page"):
50
- if page == "Introduction to NLP":
51
- st.experimental_set_query_params(page="NLP Techniques")
52
-
53
- # Handle query params to set the active page
54
- query_params = st.experimental_get_query_params()
55
- if "page" in query_params and query_params["page"]:
56
- page = query_params["page"][0]
57
 
58
 
59
  # Footer
 
42
  """)
43
 
44
  # Pagination buttons
45
+ col1, col2 = st.columns(2)
46
+ with col1:
47
+ if st.button("Previous Page"):
48
+ if current_page == "NLP Techniques":
49
+ st.experimental_set_query_params(page=pages[0])
50
+ st.experimental_rerun() # Forces the app to rerun
51
+
52
+ with col2:
53
+ if st.button("Next Page"):
54
+ if current_page == "Introduction to NLP":
55
+ st.experimental_set_query_params(page=pages[1])
56
+ st.experimental_rerun() # Forces the app to rerun
57
 
58
 
59
  # Footer