Adityaganesh commited on
Commit
8fd0330
·
verified ·
1 Parent(s): 4326cd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -6
app.py CHANGED
@@ -11,7 +11,7 @@ from nltk.corpus import stopwords
11
  from tensorflow.keras.preprocessing.sequence import pad_sequences
12
 
13
  # Ensure necessary downloads
14
- nltk.download('punkt_tab')
15
  nltk.download('stopwords')
16
  nltk.download('wordnet')
17
 
@@ -54,14 +54,20 @@ def predict_category(text):
54
  # ✅ Ensure your image is stored in the 'static' folder and referenced properly
55
  image_path = "static/News image 2.png"
56
 
57
- # Streamlit UI with Custom Background
58
  page_bg_img = f'''
59
  <style>
60
- body {{
61
- background-image: url("{image_path}");
 
62
  background-size: cover;
63
- background-position: center;
64
- background-repeat: no-repeat;
 
 
 
 
 
65
  }}
66
  .stApp {{
67
  background: rgba(255, 255, 255, 0.8);
 
11
  from tensorflow.keras.preprocessing.sequence import pad_sequences
12
 
13
  # Ensure necessary downloads
14
+ nltk.download('punkt')
15
  nltk.download('stopwords')
16
  nltk.download('wordnet')
17
 
 
54
  # ✅ Ensure your image is stored in the 'static' folder and referenced properly
55
  image_path = "static/News image 2.png"
56
 
57
+ # Streamlit UI with Custom Blurred Background
58
  page_bg_img = f'''
59
  <style>
60
+ body::before {{
61
+ content: "";
62
+ background: url("{image_path}") no-repeat center center fixed;
63
  background-size: cover;
64
+ position: fixed;
65
+ top: 0;
66
+ left: 0;
67
+ width: 100%;
68
+ height: 100%;
69
+ z-index: -1;
70
+ filter: blur(10px); /* Adjust blur intensity */
71
  }}
72
  .stApp {{
73
  background: rgba(255, 255, 255, 0.8);