Uvini commited on
Commit
4bfe754
·
1 Parent(s): 0542230

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -16,7 +16,7 @@ st.set_page_config(page_title="review Analysis", page_icon=":smiley:")
16
  # Add image and heading
17
  st.image("img.png", use_column_width=True)
18
 
19
- file = st.file_uploader("Upload the reviews to get started", type=["csv"])
20
 
21
  # Define the app's functionality
22
  if file is not None:
@@ -47,14 +47,14 @@ if file is not None:
47
  negative_reviews = " ".join(df[df["Sentiment"] == "NEGATIVE"]["Review"].tolist())
48
 
49
  st.markdown(
50
- 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: 2rem"> Causes behind Positive Reviews</div>',
51
  unsafe_allow_html=True
52
  )
53
  wc = WordCloud(width=800, height=400, background_color="white", colormap="winter").generate(positive_reviews)
54
  st.image(wc.to_array(),use_column_width=True)
55
 
56
  st.markdown(
57
- 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: 2rem"> Causes behind Negative Reviews</div>',
58
  unsafe_allow_html=True
59
  )
60
  wc = WordCloud(width=800, height=400, background_color="white", colormap="winter").generate(negative_reviews)
@@ -62,7 +62,7 @@ if file is not None:
62
 
63
  # Display the sentiment of each review as cards
64
  st.markdown(
65
- f'<div style="background-color: #4AA6DD; color: #ffffff; padding: 6px; font-size: 20px; font-family: Verdana; font-weight: bold; text-align: center; margin-top: 60px; border-radius: 2rem"> What customers said about us</div>',
66
  unsafe_allow_html=True
67
  )
68
 
@@ -93,8 +93,7 @@ if file is not None:
93
  st.download_button(
94
  label="Download data as CSV",
95
  data=csv,
96
- file_name='Review Sentiments.csv',
97
- style="background-color: #4AA6DD; color: #FFFFFF; border-radius: 4px; padding: 6px;font-size: 15px;font-family: Verdana;"
98
  )
99
 
100
  else:
 
16
  # Add image and heading
17
  st.image("img.png", use_column_width=True)
18
 
19
+ file = st.file_uploader("", type=["csv"])
20
 
21
  # Define the app's functionality
22
  if file is not None:
 
47
  negative_reviews = " ".join(df[df["Sentiment"] == "NEGATIVE"]["Review"].tolist())
48
 
49
  st.markdown(
50
+ 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>',
51
  unsafe_allow_html=True
52
  )
53
  wc = WordCloud(width=800, height=400, background_color="white", colormap="winter").generate(positive_reviews)
54
  st.image(wc.to_array(),use_column_width=True)
55
 
56
  st.markdown(
57
+ 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>',
58
  unsafe_allow_html=True
59
  )
60
  wc = WordCloud(width=800, height=400, background_color="white", colormap="winter").generate(negative_reviews)
 
62
 
63
  # Display the sentiment of each review as cards
64
  st.markdown(
65
+ f'<div style="background-color: #4AA6DD; color: #ffffff; padding: 6px; font-size: 20px; font-family: Verdana; font-weight: bold; text-align: center; margin-top: 60px; border-radius: 1rem"> What customers said about us</div>',
66
  unsafe_allow_html=True
67
  )
68
 
 
93
  st.download_button(
94
  label="Download data as CSV",
95
  data=csv,
96
+ file_name='Review Sentiments.csv'
 
97
  )
98
 
99
  else: