Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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/
|
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: #
|
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', '
|
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 = '
|
110 |
with col5:
|
111 |
if st.button("β½ Sports"):
|
112 |
selected_category = 'Sports'
|
113 |
with col6:
|
114 |
if st.button("π World News"):
|
115 |
-
selected_category = '
|
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]
|