Sentiment_Analysis / pages /1_Data_Overview.py
Srikanth0804's picture
Update pages/1_Data_Overview.py
616588b verified
Raw History Blame Contribute Delete
1.1 kB
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")