Mpavan45 commited on
Commit
da0932e
·
verified ·
1 Parent(s): a68967b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +42 -15
app.py CHANGED
@@ -34,28 +34,55 @@ st.markdown("""
34
  <div class='radium'>🛡️ PressGuard</div>
35
  """, unsafe_allow_html=True)
36
 
37
- st.markdown(
38
- """
39
- <img src="https://cdn-uploads.huggingface.co/production/uploads/675fab3a2d0851e23d23cad3/ut9wBSlRR2CCpw95V5ej8.jpeg" width="100%" />
40
- """,
41
- unsafe_allow_html=True
42
- )
43
 
 
 
44
  st.markdown(
45
- """
46
  <style>
47
- body {
48
- background-image: url('https://cdn-uploads.huggingface.co/production/uploads/675fab3a2d0851e23d23cad3/ut9wBSlRR2CCpw95V5ej8.jpeg');
49
- background-size: cover;
50
- background-repeat: no-repeat;
51
- background-attachment: fixed;
52
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  </style>
54
- """,
55
  unsafe_allow_html=True
56
  )
57
 
58
-
59
  # Background Image and Enhanced Styling
60
  st.markdown(
61
  """
 
34
  <div class='radium'>🛡️ PressGuard</div>
35
  """, unsafe_allow_html=True)
36
 
37
+ # st.markdown(
38
+ # """
39
+ # <img src="https://cdn-uploads.huggingface.co/production/uploads/675fab3a2d0851e23d23cad3/ut9wBSlRR2CCpw95V5ej8.jpeg" width="100%" />
40
+ # """,
41
+ # unsafe_allow_html=True
42
+ # )
43
 
44
+ # Apply custom CSS for the background image and overlay
45
+ background_image_url="https://cdn-uploads.huggingface.co/production/uploads/675fab3a2d0851e23d23cad3/ut9wBSlRR2CCpw95V5ej8.jpeg"
46
  st.markdown(
47
+ f"""
48
  <style>
49
+ .stApp {{
50
+ background-image: url("{background_image_url}");
51
+ background-size: auto; /* Ensure the image width is 100% of the screen, and the height scales proportionally */
52
+ background-repeat: repeat; /* Repeat only vertically */
53
+ background-position: top center; /* Start repeating from the top center */
54
+ background-attachment: fixed; /* Keeps the background fixed as you scroll */
55
+ height: 100%;
56
+ }}
57
+
58
+ /* Semi-transparent overlay */
59
+ .stApp::before {{
60
+ content: "";
61
+ position: absolute;
62
+ top: 0;
63
+ left: 0;
64
+ width: 100%;
65
+ height: 100%;
66
+ background: rgba(0, 0, 0, 0.4); /* Adjust transparency here (0.4 for 40% transparency) */
67
+ z-index: -1;
68
+ }}
69
+
70
+ /* Container to center elements and limit width */
71
+ .content-container {{
72
+ max-width: 70%; /* Limit content width to 70% */
73
+ margin: 0 auto; /* Center the container */
74
+ padding: 50px; /* Add some padding for spacing */
75
+ }}
76
+ /* Styling the markdown content */
77
+ .stMarkdown {{
78
+ color: white; /* White text to ensure visibility */
79
+ font-size: 100px; /* Adjust font size for readability */
80
+ }}
81
  </style>
82
+ """,
83
  unsafe_allow_html=True
84
  )
85
 
 
86
  # Background Image and Enhanced Styling
87
  st.markdown(
88
  """