Uvini commited on
Commit
472bce3
1 Parent(s): 726740f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -22,11 +22,11 @@ file = st.file_uploader(" ",label_visibility='collapsed',type=["csv"])
22
  if file is not None:
23
  # Read the CSV file into a Pandas DataFrame
24
  df = pd.read_csv(file)
25
- st.markdown(f"<h5 style='font-family: sans-serif;font-size: 16px;'>Total reviews: {len(df)-1} </h5>", unsafe_allow_html=True)
26
 
27
  # Write the total number of records
28
  st.markdown(
29
- f'<div style="background-color: #4AA6DD; color: #ffffff; padding: 6px; font-size: 16px; font-family: sans-serif; font-weight: bold; text-align: center; border-radius: 1rem;margin-top: 40px"> Distribution of Reviews </div>',
30
  unsafe_allow_html=True
31
  )
32
 
@@ -76,7 +76,7 @@ if file is not None:
76
  filter_sentiment = st.selectbox("", ["ALL", "POSITIVE", "NEGATIVE"])
77
 
78
  # Filter the dataframe based on the selected sentiment
79
- if filter_sentiment != "All":
80
  df = df[df['Sentiment'] == filter_sentiment]
81
 
82
  # Set the max number of rows to display at a time
 
22
  if file is not None:
23
  # Read the CSV file into a Pandas DataFrame
24
  df = pd.read_csv(file)
25
+ st.markdown(f"<h5 style='font-family: sans-serif;margin-top:40px'>Total reviews: {len(df)-1} </h5>", unsafe_allow_html=True)
26
 
27
  # Write the total number of records
28
  st.markdown(
29
+ f'<div style="background-color: #4AA6DD; color: #ffffff; padding: 6px; font-size: 16px; font-family: sans-serif; font-weight: bold; text-align: center; border-radius: 1rem;margin-top: 10px"> Distribution of Reviews </div>',
30
  unsafe_allow_html=True
31
  )
32
 
 
76
  filter_sentiment = st.selectbox("", ["ALL", "POSITIVE", "NEGATIVE"])
77
 
78
  # Filter the dataframe based on the selected sentiment
79
+ if filter_sentiment != "ALL":
80
  df = df[df['Sentiment'] == filter_sentiment]
81
 
82
  # Set the max number of rows to display at a time