Mpavan45 commited on
Commit
b11cb41
·
verified ·
1 Parent(s): 3319bd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -22
app.py CHANGED
@@ -9,49 +9,50 @@ from langchain_core.output_parsers import StrOutputParser
9
  # Set page config
10
 
11
  st.set_page_config(page_title="🏏 Ultimate Cricket Analytics", layout="wide")
12
- Define the URL of the background image (use your own image URL)
13
  background_image_url = "https://cdn-uploads.huggingface.co/production/uploads/675fab3a2d0851e23d23cad3/21R6kZu1KSzSI8AJKMWWD.png"
14
 
15
- # # Apply custom CSS for the background image and overlay
16
  st.markdown(
17
  f"""
18
  <style>
 
19
  .stApp {{
20
  background-image: url("{background_image_url}");
21
- background-size: auto; /* Ensure the image width is 100% of the screen, and the height scales proportionally */
22
- /* background-repeat: ; Repeat only vertically */
23
- background-position: top center; /* Start repeating from the top center */
24
- background-attachment: fixed; /* Keeps the background fixed as you scroll */
25
- height: 100%;
26
  }}
27
-
28
- /* Semi-transparent overlay */
29
  .stApp::before {{
30
  content: "";
31
- position: absolute;
32
  top: 0;
33
  left: 0;
34
  width: 100%;
35
  height: 100%;
36
- background: rgba(0, 0, 0, 0.4); /* Adjust transparency here (0.4 for 40% transparency) */
37
- z-index: -1;
38
  }}
39
-
40
- /* Container to center elements and limit width */
41
- .content-container {{
42
- max-width: 70%; /* Limit content width to 70% */
43
- margin: 0 auto; /* Center the container */
44
- padding: 50px; /* Add some padding for spacing */
45
  }}
46
- /* Styling the markdown content */
 
47
  .stMarkdown {{
48
- color: white; /* White text to ensure visibility */
49
- font-size: 100px; /* Adjust font size for readability */
50
  }}
51
  </style>
52
- """,
53
  unsafe_allow_html=True
54
  )
 
55
 
56
 
57
 
 
9
  # Set page config
10
 
11
  st.set_page_config(page_title="🏏 Ultimate Cricket Analytics", layout="wide")
12
+ # Define the URL of the background image (use your own image URL)
13
  background_image_url = "https://cdn-uploads.huggingface.co/production/uploads/675fab3a2d0851e23d23cad3/21R6kZu1KSzSI8AJKMWWD.png"
14
 
 
15
  st.markdown(
16
  f"""
17
  <style>
18
+ /* Background image */
19
  .stApp {{
20
  background-image: url("{background_image_url}");
21
+ background-size: cover;
22
+ background-repeat: repeat-y; /* Repeat vertically */
23
+ background-position: top center;
24
+ background-attachment: fixed;
25
+ position: relative;
26
  }}
27
+
28
+ /* Dark overlay */
29
  .stApp::before {{
30
  content: "";
31
+ position: fixed;
32
  top: 0;
33
  left: 0;
34
  width: 100%;
35
  height: 100%;
36
+ background-color: rgba(0, 0, 0, 0.4); /* 40% black overlay */
37
+ z-index: 0;
38
  }}
39
+
40
+ /* Ensure all content is above the overlay */
41
+ .block-container {{
42
+ position: relative;
43
+ z-index: 1;
 
44
  }}
45
+
46
+ /* Optional: style markdown globally */
47
  .stMarkdown {{
48
+ color: white !important;
49
+ font-size: 20px !important;
50
  }}
51
  </style>
52
+ """,
53
  unsafe_allow_html=True
54
  )
55
+
56
 
57
 
58