Mpavan45 commited on
Commit
c9faa0f
·
verified ·
1 Parent(s): 4996224

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -7,7 +7,7 @@ sidebar = st.sidebar
7
  sidebar.header('🌐 NLP Navigation')
8
 
9
  # Sidebar options for NLP Overview, Lifecycle, and Techniques
10
- sidebar_option = sidebar.radio('Choose a section to explore:', ['What is NLP? 🧠', 'NLP Lifecycle 🔄', 'NLP Techniques ⚙️'])
11
 
12
  # Store the selected page in session state
13
  if 'selected_page' not in st.session_state:
@@ -21,17 +21,17 @@ if sidebar_option != st.session_state.selected_page:
21
  def set_title(title, color="black"):
22
  st.markdown(f"<h1 style='text-align: center; color: {color};'>{title}</h1>", unsafe_allow_html=True)
23
 
24
- if st.session_state.selected_page == 'What is NLP? 🧠':
25
  set_title('Natural Language Processing (NLP)', color="darkgreen")
26
 
27
- elif st.session_state.selected_page == 'NLP Lifecycle 🔄':
28
  set_title('Natural Language Processing (NLP) Lifecycle', color="darkgreen")
29
 
30
- elif st.session_state.selected_page == 'NLP Techniques ⚙️':
31
- set_title('⚙️ Techniques in Natural Language Processing (NLP) ⚙️', color="darkgreen")
32
 
33
  # Content for "What is NLP? 🧠"
34
- if st.session_state.selected_page == 'What is NLP? 🧠':
35
  st.markdown("<h2 style='text-align: center; color: darkgreen;'>📘 Introduction to NLP</h2>", unsafe_allow_html=True)
36
  st.write("""
37
  #### 🤖 What is NLP?
@@ -58,10 +58,10 @@ if st.session_state.selected_page == 'What is NLP? 🧠':
58
  """)
59
 
60
  # Content for NLP Lifecycle
61
- elif st.session_state.selected_page == "NLP Lifecycle 🔄":
62
  lifecycle_option = sidebar.radio("Select NLP Lifecycle Step:", [
63
  "🌐Overview of the NLP Life Cycle",
64
- "🎯 Problem Definition",
65
  "📊Data Collection",
66
  "📈Simple EDA",
67
  "🧹Data Preprocessing ",
@@ -111,7 +111,7 @@ elif st.session_state.selected_page == "NLP Lifecycle 🔄":
111
  10. 🛠️Monitoring and Maintenance**
112
  """)
113
 
114
- elif lifecycle_option == "🎯 Problem Definition":
115
  st.write("""
116
  #### 🔧 1. Problem Definition
117
  - The first step in the NLP lifecycle is defining the problem. This means understanding the goal and figuring out how NLP can help solve the problem.
@@ -324,7 +324,7 @@ elif st.session_state.selected_page == "NLP Lifecycle 🔄":
324
 
325
 
326
  # Content for "NLP Techniques"
327
- elif st.session_state.selected_page == "NLP Techniques ⚙️":
328
  technique_option = sidebar.radio("Select NLP Technique:", [
329
  "NLP Techniques",
330
  "Tokenization",
 
7
  sidebar.header('🌐 NLP Navigation')
8
 
9
  # Sidebar options for NLP Overview, Lifecycle, and Techniques
10
+ sidebar_option = sidebar.radio('Choose a section to explore:', ['🧠What is NLP?', '🔄NLP Lifecycle', '⚙️NLP Techniques'])
11
 
12
  # Store the selected page in session state
13
  if 'selected_page' not in st.session_state:
 
21
  def set_title(title, color="black"):
22
  st.markdown(f"<h1 style='text-align: center; color: {color};'>{title}</h1>", unsafe_allow_html=True)
23
 
24
+ if st.session_state.selected_page == '🧠What is NLP?':
25
  set_title('Natural Language Processing (NLP)', color="darkgreen")
26
 
27
+ elif st.session_state.selected_page == '🔄NLP Lifecycle':
28
  set_title('Natural Language Processing (NLP) Lifecycle', color="darkgreen")
29
 
30
+ elif st.session_state.selected_page == '⚙️NLP Techniques':
31
+ set_title('Techniques in Natural Language Processing (NLP)', color="darkgreen")
32
 
33
  # Content for "What is NLP? 🧠"
34
+ if st.session_state.selected_page == '🧠What is NLP?':
35
  st.markdown("<h2 style='text-align: center; color: darkgreen;'>📘 Introduction to NLP</h2>", unsafe_allow_html=True)
36
  st.write("""
37
  #### 🤖 What is NLP?
 
58
  """)
59
 
60
  # Content for NLP Lifecycle
61
+ elif st.session_state.selected_page == "🔄NLP Lifecycle":
62
  lifecycle_option = sidebar.radio("Select NLP Lifecycle Step:", [
63
  "🌐Overview of the NLP Life Cycle",
64
+ "🎯Problem Definition",
65
  "📊Data Collection",
66
  "📈Simple EDA",
67
  "🧹Data Preprocessing ",
 
111
  10. 🛠️Monitoring and Maintenance**
112
  """)
113
 
114
+ elif lifecycle_option == "🎯Problem Definition":
115
  st.write("""
116
  #### 🔧 1. Problem Definition
117
  - The first step in the NLP lifecycle is defining the problem. This means understanding the goal and figuring out how NLP can help solve the problem.
 
324
 
325
 
326
  # Content for "NLP Techniques"
327
+ elif st.session_state.selected_page == "⚙️NLP Techniques":
328
  technique_option = sidebar.radio("Select NLP Technique:", [
329
  "NLP Techniques",
330
  "Tokenization",