File size: 1,104 Bytes
9f78ef9
 
 
 
 
 
616588b
9f78ef9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
616588b
9f78ef9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import streamlit as st

st.title("πŸ“Š Data Collection & Preprocessing")

st.markdown("""

### πŸ” **YouTube Comment Extraction**

βœ… Used **YouTube Data API v3** via the **requests** library and **API Key** authentication

πŸ“Ή Extracted comments from 150+ video IDs across balanced sentiment categories:

🟒 **Positive:** "heartwarming reunion", "feel good moments"

πŸ”΄ **Negative:** "controversial incident", "bad customer experience"

βšͺ **Neutral:** "tech reviews", "travel vlogs"


πŸ“ˆ Gathered over **15,000** top-level comments using pagination (nextPageToken)

πŸ’Ύ Data saved into a **JSON** format with keys: **video_id** and **comment**



---

### 🧹 **Text Preprocessing Steps**

βœ… Removed HTML tags, emojis, special characters, and links

πŸ”‘ Converted text to lowercase

🧽 Removed stopwords and non-alphabetic tokens

🧠 Applied **tokenization**


The cleaned text was used to train our **sentiment classifier** in the next step.


---

""")

if st.button("Next"):
    st.switch_page("pages/2_Model_Training.py")

if st.button("Go to Home"):
    st.switch_page("app.py")