Spaces:
Sleeping
Sleeping
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") |