Srikanth0804 commited on
Commit
9f78ef9
Β·
verified Β·
1 Parent(s): 09c1749

Create pages/1_Data_Overview.py

Browse files
Files changed (1) hide show
  1. pages/1_Data_Overview.py +50 -0
pages/1_Data_Overview.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+ st.title("πŸ“Š Data Collection & Preprocessing")
4
+
5
+ st.markdown("""
6
+
7
+ πŸ” **YouTube Comment Extraction**
8
+
9
+ βœ… Used **YouTube Data API v3** via the **requests** library and **API Key** authentication
10
+
11
+ πŸ“Ή Extracted comments from 150+ video IDs across balanced sentiment categories:
12
+
13
+ 🟒 **Positive:** "heartwarming reunion", "feel good moments"
14
+
15
+ πŸ”΄ **Negative:** "controversial incident", "bad customer experience"
16
+
17
+ βšͺ **Neutral:** "tech reviews", "travel vlogs"
18
+
19
+
20
+ πŸ“ˆ Gathered over **15,000** top-level comments using pagination (nextPageToken)
21
+
22
+ πŸ’Ύ Data saved into a **JSON** format with keys: **video_id** and **comment**
23
+
24
+
25
+
26
+ ---
27
+
28
+ 🧹 **Text Preprocessing Steps**
29
+
30
+ βœ… Removed HTML tags, emojis, special characters, and links
31
+
32
+ πŸ”‘ Converted text to lowercase
33
+
34
+ 🧽 Removed stopwords and non-alphabetic tokens
35
+
36
+ 🧠 Applied **tokenization**
37
+
38
+
39
+ The cleaned text was used to train our **sentiment classifier** in the next step.
40
+
41
+
42
+ ---
43
+
44
+ """)
45
+
46
+ if st.button("Next"):
47
+ st.switch_page("pages/2_Model_Training.py")
48
+
49
+ if st.button("Go to Home"):
50
+ st.switch_page("app.py")