Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,6 +57,7 @@ def analyze_video(video_id):
|
|
| 57 |
return "No comments found."
|
| 58 |
|
| 59 |
df = pd.DataFrame(np.array(comments[:200]), columns=["comments"])
|
|
|
|
| 60 |
df["sentiment"] = df["comments"].apply(lambda x: sentiment_score(x[:512]))
|
| 61 |
|
| 62 |
sentiment_counts = df["sentiment"].value_counts().sort_index()
|
|
|
|
| 57 |
return "No comments found."
|
| 58 |
|
| 59 |
df = pd.DataFrame(np.array(comments[:200]), columns=["comments"])
|
| 60 |
+
print(df.head())
|
| 61 |
df["sentiment"] = df["comments"].apply(lambda x: sentiment_score(x[:512]))
|
| 62 |
|
| 63 |
sentiment_counts = df["sentiment"].value_counts().sort_index()
|