TAgroup5 commited on
Commit
a73b5ca
Β·
verified Β·
1 Parent(s): 0b9251c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -15,7 +15,7 @@ st.markdown("""
15
  font-family: 'Arial', sans-serif;
16
  }
17
  .stApp {
18
- background-image: url('https://i.pinimg.com/736x/9f/07/01/9f070105a396cfe2dc0dc5d7771e61f6.jpg');
19
  background-size: cover;
20
  background-position: center;
21
  padding: 20px;
@@ -27,7 +27,7 @@ st.markdown("""
27
  text-align: center;
28
  }
29
  .stButton>button {
30
- background-color: #ff5733 !important;
31
  color: white !important;
32
  font-size: 18px !important;
33
  border-radius: 10px !important;
@@ -90,7 +90,7 @@ if uploaded_file is not None:
90
  st.download_button("πŸ“₯ Download Classified News", data=output.getvalue(), file_name="classified_news.csv", mime="text/csv")
91
 
92
  st.write("πŸ” **Filter by Category**")
93
- categories = ['All', 'Business', 'Opinion', 'Political Gossip', 'Sports', 'World News']
94
 
95
  col1, col2, col3, col4, col5, col6 = st.columns(6)
96
  selected_category = 'All'
@@ -106,13 +106,13 @@ if uploaded_file is not None:
106
  selected_category = 'Opinion'
107
  with col4:
108
  if st.button("πŸ› Political Gossip"):
109
- selected_category = 'Political Gossip'
110
  with col5:
111
  if st.button("⚽ Sports"):
112
  selected_category = 'Sports'
113
  with col6:
114
  if st.button("🌎 World News"):
115
- selected_category = 'World News'
116
 
117
  if selected_category != 'All':
118
  filtered_df = df[df['class'] == selected_category]
 
15
  font-family: 'Arial', sans-serif;
16
  }
17
  .stApp {
18
+ background-image: url('https://i.pinimg.com/736x/32/a7/6a/32a76a7f9060a710e5a52be12c6173d6.jpg');
19
  background-size: cover;
20
  background-position: center;
21
  padding: 20px;
 
27
  text-align: center;
28
  }
29
  .stButton>button {
30
+ background-color: #088da5 !important;
31
  color: white !important;
32
  font-size: 18px !important;
33
  border-radius: 10px !important;
 
90
  st.download_button("πŸ“₯ Download Classified News", data=output.getvalue(), file_name="classified_news.csv", mime="text/csv")
91
 
92
  st.write("πŸ” **Filter by Category**")
93
+ categories = ['All', 'Business', 'Opinion', 'Political_gossip', 'Sports', 'World_news']
94
 
95
  col1, col2, col3, col4, col5, col6 = st.columns(6)
96
  selected_category = 'All'
 
106
  selected_category = 'Opinion'
107
  with col4:
108
  if st.button("πŸ› Political Gossip"):
109
+ selected_category = 'Political_gossip'
110
  with col5:
111
  if st.button("⚽ Sports"):
112
  selected_category = 'Sports'
113
  with col6:
114
  if st.button("🌎 World News"):
115
+ selected_category = 'World_news'
116
 
117
  if selected_category != 'All':
118
  filtered_df = df[df['class'] == selected_category]