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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -44,11 +44,17 @@ elif page == "NLP Techniques":
44
  # Pagination buttons
45
  if st.button("Previous Page"):
46
  if page == "NLP Techniques":
47
- st.query_params(page=pages[0])
48
 
49
  if st.button("Next Page"):
50
  if page == "Introduction to NLP":
51
- st.query_params(page=pages[1])
 
 
 
 
 
 
52
 
53
  # Footer
54
  st.sidebar.write("---")
 
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
60
  st.sidebar.write("---")