Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ if file is not None:
|
|
33 |
st.markdown(f"<h5 style='font-family: sans-serif;margin-top:40px'>Total reviews: {len(df)} </h5>", unsafe_allow_html=True)
|
34 |
|
35 |
st.markdown(
|
36 |
-
f'<div style="background-color: #
|
37 |
unsafe_allow_html=True
|
38 |
)
|
39 |
# Apply the sentiment analysis model
|
@@ -55,14 +55,14 @@ if file is not None:
|
|
55 |
col1, col2 = st.columns(2)
|
56 |
with col1:
|
57 |
st.markdown(
|
58 |
-
f'<div style="background-color: #
|
59 |
unsafe_allow_html=True
|
60 |
)
|
61 |
wc_pos = WordCloud(width=800, height=600, background_color="white", colormap="winter").generate(positive_reviews)
|
62 |
st.image(wc_pos.to_array(),use_column_width=True)
|
63 |
with col2:
|
64 |
st.markdown(
|
65 |
-
f'<div style="background-color: #
|
66 |
unsafe_allow_html=True
|
67 |
)
|
68 |
wc_neg = WordCloud(width=800, height=600, background_color="white", colormap="winter").generate(negative_reviews)
|
@@ -70,7 +70,7 @@ if file is not None:
|
|
70 |
|
71 |
# Display the sentiment of each review as a dataframe
|
72 |
st.markdown(
|
73 |
-
f'<div style="background-color: #
|
74 |
unsafe_allow_html=True
|
75 |
)
|
76 |
# Add a filter for sentiments
|
@@ -108,4 +108,4 @@ if file is not None:
|
|
108 |
|
109 |
# Footnote
|
110 |
st.write("<br>", unsafe_allow_html=True)
|
111 |
-
st.caption('<div style="text-align:center; background-color:#
|
|
|
33 |
st.markdown(f"<h5 style='font-family: sans-serif;margin-top:40px'>Total reviews: {len(df)} </h5>", unsafe_allow_html=True)
|
34 |
|
35 |
st.markdown(
|
36 |
+
f'<div style="background-color: #2C6E49; color: #ffffff; padding: 6px; font-size: 20px; font-weight: bold; text-align: center; border-radius: 1rem;margin-top: 10px"> Distribution of Reviews </div>',
|
37 |
unsafe_allow_html=True
|
38 |
)
|
39 |
# Apply the sentiment analysis model
|
|
|
55 |
col1, col2 = st.columns(2)
|
56 |
with col1:
|
57 |
st.markdown(
|
58 |
+
f'<div style="background-color: #2C6E49; color: #ffffff; padding: 6px; font-size: 20px; font-weight: bold; text-align: center; margin-bottom: 40px; border-radius: 1rem">Positive Reviews</div>',
|
59 |
unsafe_allow_html=True
|
60 |
)
|
61 |
wc_pos = WordCloud(width=800, height=600, background_color="white", colormap="winter").generate(positive_reviews)
|
62 |
st.image(wc_pos.to_array(),use_column_width=True)
|
63 |
with col2:
|
64 |
st.markdown(
|
65 |
+
f'<div style="background-color: #2C6E49; color: #ffffff; padding: 6px; font-size: 20px; font-weight: bold; text-align: center; margin-bottom: 40px;border-radius: 1rem">Negative Reviews</div>',
|
66 |
unsafe_allow_html=True
|
67 |
)
|
68 |
wc_neg = WordCloud(width=800, height=600, background_color="white", colormap="winter").generate(negative_reviews)
|
|
|
70 |
|
71 |
# Display the sentiment of each review as a dataframe
|
72 |
st.markdown(
|
73 |
+
f'<div style="background-color: #2C6E49; color: #ffffff; padding: 6px; font-size: 20px; font-weight: bold; text-align: center; margin-top: 60px; border-radius: 1rem"> Reviews in depth </div>',
|
74 |
unsafe_allow_html=True
|
75 |
)
|
76 |
# Add a filter for sentiments
|
|
|
108 |
|
109 |
# Footnote
|
110 |
st.write("<br>", unsafe_allow_html=True)
|
111 |
+
st.caption('<div style="text-align:center; background-color:#C4D6CC;padding: 6px">crafted with ❤️</div>', unsafe_allow_html=True)
|