Mpavan45 commited on
Commit
61c9b67
Β·
verified Β·
1 Parent(s): d58e078

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -18
app.py CHANGED
@@ -60,18 +60,18 @@ if st.session_state.selected_page == 'What is NLP? 🧠':
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 🧹",
68
- "Feature Engineering πŸ“",
69
- "Model Training πŸ‹οΈβ€β™‚οΈ",
70
- "Evaluation πŸ…",
71
- "Deployment πŸš€"
72
  ])
73
 
74
- if lifecycle_option == "Overview of the NLP Life Cycle":
75
  st.write("""
76
  #### Overview of the NLP Life Cycle:
77
  The NLP life cycle is a structured process for building, using, and maintaining systems that work with human language. It turns unstructured text into meaningful insights or automated actions. This process ensures continuous improvement and adapts to real-world needs.
@@ -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.
@@ -124,7 +124,7 @@ elif st.session_state.selected_page == "NLP Lifecycle πŸ”„":
124
  **Example of a problem statement**: The goal could be to classify customer reviews as either positive or negative, or to find the main topics in product reviews.
125
  """)
126
 
127
- elif lifecycle_option == "Data Collection":
128
  st.write("""
129
  #### πŸ“š 2. Data Collection
130
  Data collection is the second step in the NLP lifecycle. It involves gathering data from various sources based on the problem statement, so it can be analyzed and processed.
@@ -182,7 +182,7 @@ elif st.session_state.selected_page == "NLP Lifecycle πŸ”„":
182
  """)
183
 
184
 
185
- elif lifecycle_option == "Simple EDA":
186
  st.write("""
187
  #### πŸ” 3. Simple EDA
188
  #### Simple Exploratory Data Analysis (Simple EDA)
@@ -217,7 +217,7 @@ elif st.session_state.selected_page == "NLP Lifecycle πŸ”„":
217
 
218
 
219
 
220
- elif lifecycle_option == "Data Preprocessing":
221
  st.write("""
222
  #### 🧹 4. Text Preprocessing
223
  Text preprocessing prepares raw text for further analysis. This stage involves cleaning and transforming the data into a structured format that machine learning models can understand.
@@ -275,7 +275,7 @@ elif st.session_state.selected_page == "NLP Lifecycle πŸ”„":
275
  """)
276
 
277
 
278
- elif lifecycle_option == "Feature Engineering":
279
  st.write("""
280
  #### πŸ“ 5. Text Representation
281
  After preprocessing, the text data needs to be converted into a numerical format for use in machine learning models. There are several methods for text representation:
@@ -288,7 +288,7 @@ elif st.session_state.selected_page == "NLP Lifecycle πŸ”„":
288
  - Vector: [1, 1, 1] (word frequency representation)
289
  """)
290
 
291
- elif lifecycle_option == "Model Training":
292
  st.write("""
293
  #### πŸ‹οΈβ€β™‚οΈ 6. Model Training
294
  In the model training stage, machine learning algorithms are trained on the preprocessed and represented text data. The choice of model depends on the task:
@@ -299,7 +299,7 @@ elif st.session_state.selected_page == "NLP Lifecycle πŸ”„":
299
  **Example**: Training a Naive Bayes classifier to categorize news articles into topics such as "Sports", "Politics", etc.
300
  """)
301
 
302
- elif lifecycle_option == "Evaluation":
303
  st.write("""
304
  #### πŸ… 7. Evaluation
305
  After training the model, it's important to evaluate its performance using metrics such as accuracy, precision, recall, and F1-score.
@@ -311,7 +311,7 @@ elif st.session_state.selected_page == "NLP Lifecycle πŸ”„":
311
  **Example**: Evaluating a sentiment analysis model using accuracy and F1-score on a test dataset.
312
  """)
313
 
314
- elif lifecycle_option == "Deployment":
315
  st.write("""
316
  #### πŸš€ 8. Deployment
317
  Once the model is evaluated and tuned, it is deployed into production where it can be used by end users. Deployment involves:
 
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 ",
68
+ "πŸ“Feature Engineering",
69
+ "πŸ‹οΈβ€β™‚οΈModel Training",
70
+ "πŸ…Evaluation",
71
+ "πŸš€Deployment"
72
  ])
73
 
74
+ if lifecycle_option == "Overview of the NLP Life Cycle 🌐":
75
  st.write("""
76
  #### Overview of the NLP Life Cycle:
77
  The NLP life cycle is a structured process for building, using, and maintaining systems that work with human language. It turns unstructured text into meaningful insights or automated actions. This process ensures continuous improvement and adapts to real-world needs.
 
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.
 
124
  **Example of a problem statement**: The goal could be to classify customer reviews as either positive or negative, or to find the main topics in product reviews.
125
  """)
126
 
127
+ elif lifecycle_option == "πŸ“ŠData Collection":
128
  st.write("""
129
  #### πŸ“š 2. Data Collection
130
  Data collection is the second step in the NLP lifecycle. It involves gathering data from various sources based on the problem statement, so it can be analyzed and processed.
 
182
  """)
183
 
184
 
185
+ elif lifecycle_option == "πŸ“ˆSimple EDA":
186
  st.write("""
187
  #### πŸ” 3. Simple EDA
188
  #### Simple Exploratory Data Analysis (Simple EDA)
 
217
 
218
 
219
 
220
+ elif lifecycle_option == "🧹Data Preprocessing ":
221
  st.write("""
222
  #### 🧹 4. Text Preprocessing
223
  Text preprocessing prepares raw text for further analysis. This stage involves cleaning and transforming the data into a structured format that machine learning models can understand.
 
275
  """)
276
 
277
 
278
+ elif lifecycle_option == "πŸ“Feature Engineering":
279
  st.write("""
280
  #### πŸ“ 5. Text Representation
281
  After preprocessing, the text data needs to be converted into a numerical format for use in machine learning models. There are several methods for text representation:
 
288
  - Vector: [1, 1, 1] (word frequency representation)
289
  """)
290
 
291
+ elif lifecycle_option == "πŸ‹οΈβ€β™‚οΈModel Training":
292
  st.write("""
293
  #### πŸ‹οΈβ€β™‚οΈ 6. Model Training
294
  In the model training stage, machine learning algorithms are trained on the preprocessed and represented text data. The choice of model depends on the task:
 
299
  **Example**: Training a Naive Bayes classifier to categorize news articles into topics such as "Sports", "Politics", etc.
300
  """)
301
 
302
+ elif lifecycle_option == "πŸ…Evaluation":
303
  st.write("""
304
  #### πŸ… 7. Evaluation
305
  After training the model, it's important to evaluate its performance using metrics such as accuracy, precision, recall, and F1-score.
 
311
  **Example**: Evaluating a sentiment analysis model using accuracy and F1-score on a test dataset.
312
  """)
313
 
314
+ elif lifecycle_option == "πŸš€Deployment":
315
  st.write("""
316
  #### πŸš€ 8. Deployment
317
  Once the model is evaluated and tuned, it is deployed into production where it can be used by end users. Deployment involves: