Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -48,22 +48,23 @@ if file is not None:
|
|
48 |
negative_reviews = " ".join(df[df["Sentiment"] == "NEGATIVE"]["Review"].tolist())
|
49 |
|
50 |
# Center-align the word clouds
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
|
|
67 |
|
68 |
# Display the sentiment of each review as cards
|
69 |
st.markdown(
|
|
|
48 |
negative_reviews = " ".join(df[df["Sentiment"] == "NEGATIVE"]["Review"].tolist())
|
49 |
|
50 |
# Center-align the word clouds
|
51 |
+
col1, col2 = st.columns(2)
|
52 |
+
|
53 |
+
with col1:
|
54 |
+
st.markdown(
|
55 |
+
f'<div style="background-color: #4AA6DD; color: #ffffff; padding: 6px; font-size: 20px; font-family: Verdana; font-weight: bold; text-align: center; margin-bottom: 40px; border-radius: 1rem">Causes behind Positive Reviews</div>',
|
56 |
+
unsafe_allow_html=True
|
57 |
+
)
|
58 |
+
wc_pos = WordCloud(width=800, height=400, background_color="white", colormap="winter").generate(positive_reviews)
|
59 |
+
st.image(wc_pos.to_array(),use_column_width=True)
|
60 |
+
|
61 |
+
with col2:
|
62 |
+
st.markdown(
|
63 |
+
f'<div style="background-color: #4AA6DD; color: #ffffff; padding: 6px; font-size: 20px; font-family: Verdana; font-weight: bold; text-align: center; margin-bottom: 40px; margin-top: 60px; border-radius: 1rem"> Causes behind Negative Reviews</div>',
|
64 |
+
unsafe_allow_html=True
|
65 |
+
)
|
66 |
+
wc_neg = WordCloud(width=800, height=400, background_color="white", colormap="winter").generate(negative_reviews)
|
67 |
+
st.image(wc_neg.to_array(),use_column_width=True)
|
68 |
|
69 |
# Display the sentiment of each review as cards
|
70 |
st.markdown(
|