Krittaprot
commited on
Commit
•
08c07a3
1
Parent(s):
51f9816
Update app.py
Browse files
app.py
CHANGED
@@ -137,7 +137,7 @@ def comments_analyzer(comments_df):
|
|
137 |
|
138 |
data = {}
|
139 |
#Categorize the comments by sentiment and count them
|
140 |
-
data['
|
141 |
data['total_comments'] = len(comments_df)
|
142 |
data['num_positive'] = comments_df['sentiment'].value_counts().get('positive', 0)
|
143 |
data['num_neutral'] = comments_df['sentiment'].value_counts().get('neutral', 0)
|
@@ -239,7 +239,7 @@ def process_youtube_comments(youtube_link, max_comments, stop_words):
|
|
239 |
# Process the YouTube link and generate the word cloud, summary, and sentiment analysis
|
240 |
|
241 |
# Pull comments from the YouTube Video
|
242 |
-
comments_df = comments_collector(video_link=
|
243 |
# Analyze
|
244 |
analysis_dict = comments_analyzer(comments_df)
|
245 |
long_text = analysis_dict['blended_comments']
|
|
|
137 |
|
138 |
data = {}
|
139 |
#Categorize the comments by sentiment and count them
|
140 |
+
data['video_id'] = video_id
|
141 |
data['total_comments'] = len(comments_df)
|
142 |
data['num_positive'] = comments_df['sentiment'].value_counts().get('positive', 0)
|
143 |
data['num_neutral'] = comments_df['sentiment'].value_counts().get('neutral', 0)
|
|
|
239 |
# Process the YouTube link and generate the word cloud, summary, and sentiment analysis
|
240 |
|
241 |
# Pull comments from the YouTube Video
|
242 |
+
comments_df = comments_collector(video_link=youtube_link, max_comments=max_comments)
|
243 |
# Analyze
|
244 |
analysis_dict = comments_analyzer(comments_df)
|
245 |
long_text = analysis_dict['blended_comments']
|