Spaces:
Sleeping
Sleeping
Upload 6 files
Browse files
eda.py
CHANGED
|
@@ -55,7 +55,7 @@ def app():
|
|
| 55 |
st.pyplot(plt)
|
| 56 |
st.write("Insight: surprise sentiment has the lowest value of around 900 data")
|
| 57 |
elif val == "Word Clouds":
|
| 58 |
-
|
| 59 |
plot_wordcloud('joy')
|
| 60 |
plot_wordcloud('sadness')
|
| 61 |
plot_wordcloud('anger')
|
|
@@ -66,7 +66,7 @@ def app():
|
|
| 66 |
elif val == "Stopwords Boxplot Distributions":
|
| 67 |
temp_b = df.copy()
|
| 68 |
temp_b['stopword_count'] = temp_b['text'].apply(lambda x: sum(1 for word in x.split() if word.lower() in stop_words))
|
| 69 |
-
|
| 70 |
# Plot stopword count distribution by sentiment
|
| 71 |
sns.boxplot(data=temp_b, x='feeling', y='stopword_count')
|
| 72 |
plt.title('Stopword Count by Sentiment')
|
|
|
|
| 55 |
st.pyplot(plt)
|
| 56 |
st.write("Insight: surprise sentiment has the lowest value of around 900 data")
|
| 57 |
elif val == "Word Clouds":
|
| 58 |
+
st.header('Word Clouds')
|
| 59 |
plot_wordcloud('joy')
|
| 60 |
plot_wordcloud('sadness')
|
| 61 |
plot_wordcloud('anger')
|
|
|
|
| 66 |
elif val == "Stopwords Boxplot Distributions":
|
| 67 |
temp_b = df.copy()
|
| 68 |
temp_b['stopword_count'] = temp_b['text'].apply(lambda x: sum(1 for word in x.split() if word.lower() in stop_words))
|
| 69 |
+
st.header('Stopword Count Boxplot')
|
| 70 |
# Plot stopword count distribution by sentiment
|
| 71 |
sns.boxplot(data=temp_b, x='feeling', y='stopword_count')
|
| 72 |
plt.title('Stopword Count by Sentiment')
|