Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -161,18 +161,37 @@ st.markdown(
|
|
| 161 |
}
|
| 162 |
|
| 163 |
.result-box {
|
| 164 |
-
|
| 165 |
-
font-size: 28px;
|
| 166 |
font-weight: bold;
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
}
|
| 177 |
</style>
|
| 178 |
""",
|
|
@@ -241,6 +260,29 @@ def predict_category(text):
|
|
| 241 |
|
| 242 |
# ✅ Streamlit UI
|
| 243 |
st.title("AI-Powered News Categorization")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 244 |
|
| 245 |
input_text = st.text_area("Enter News Article:", height=200)
|
| 246 |
|
|
|
|
| 161 |
}
|
| 162 |
|
| 163 |
.result-box {
|
| 164 |
+
font-size: 22px;
|
|
|
|
| 165 |
font-weight: bold;
|
| 166 |
+
color: white;
|
| 167 |
+
text-align: center;
|
| 168 |
+
background: linear-gradient(135deg, #6a11cb, #2575fc, #ff6a00, #ffcc00);
|
| 169 |
+
background-size: 400% 400%;
|
| 170 |
+
animation: gradientAnimation 6s ease infinite;
|
| 171 |
+
padding: 20px;
|
| 172 |
+
border-radius: 12px;
|
| 173 |
+
box-shadow: 0 0 15px rgba(0, 0, 0, 0.5),
|
| 174 |
+
0 0 25px rgba(255, 105, 180, 0.7),
|
| 175 |
+
0 0 35px rgba(0, 191, 255, 0.7);
|
| 176 |
+
transition: all 0.4s ease-in-out;
|
| 177 |
+
}
|
| 178 |
+
.result-box:hover {
|
| 179 |
+
transform: scale(1.08) rotate(1deg);
|
| 180 |
+
box-shadow: 0 0 25px rgba(0, 0, 0, 0.7),
|
| 181 |
+
0 0 35px rgba(255, 105, 180, 0.9),
|
| 182 |
+
0 0 45px rgba(0, 191, 255, 0.9);
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
@keyframes gradientAnimation {
|
| 186 |
+
0% {
|
| 187 |
+
background-position: 0% 50%;
|
| 188 |
+
}
|
| 189 |
+
50% {
|
| 190 |
+
background-position: 100% 50%;
|
| 191 |
+
}
|
| 192 |
+
100% {
|
| 193 |
+
background-position: 0% 50%;
|
| 194 |
+
}
|
| 195 |
}
|
| 196 |
</style>
|
| 197 |
""",
|
|
|
|
| 260 |
|
| 261 |
# ✅ Streamlit UI
|
| 262 |
st.title("AI-Powered News Categorization")
|
| 263 |
+
st.markdown("""
|
| 264 |
+
<style>
|
| 265 |
+
.title-box {
|
| 266 |
+
font-size: 48px;
|
| 267 |
+
font-weight: bold;
|
| 268 |
+
text-align: center;
|
| 269 |
+
background: linear-gradient(135deg, #ff7e5f, #feb47b, #86a8e7, #91eac9);
|
| 270 |
+
-webkit-background-clip: text;
|
| 271 |
+
-webkit-text-fill-color: transparent;
|
| 272 |
+
animation: gradientAnimation 6s ease infinite;
|
| 273 |
+
margin-bottom: 30px;
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
@keyframes gradientAnimation {
|
| 277 |
+
0% { background-position: 0% 50%; }
|
| 278 |
+
50% { background-position: 100% 50%; }
|
| 279 |
+
100% { background-position: 0% 50%; }
|
| 280 |
+
}
|
| 281 |
+
</style>
|
| 282 |
+
|
| 283 |
+
<div class="title-box">AI-Powered News Categorization</div>
|
| 284 |
+
""", unsafe_allow_html=True)
|
| 285 |
+
|
| 286 |
|
| 287 |
input_text = st.text_area("Enter News Article:", height=200)
|
| 288 |
|