sahandkh1419 commited on
Commit
0a48439
1 Parent(s): 613be48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -2
app.py CHANGED
@@ -24,12 +24,36 @@ st.markdown(
24
  )
25
 
26
 
27
- background_image_url = "https://static.vecteezy.com/system/resources/previews/020/333/164/non_2x/stephen-foster-memorial-day-illustration-with-copy-space-area-and-blue-background-suitable-to-use-on-memorial-day-event-vector.jpg"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  st.markdown(
29
  f"""
30
  <style>
31
  .stApp {{
32
- background-image: url("{background_image_url}");
33
  background-size: cover;
34
  background-position: center;
35
  background-repeat: no-repeat;
@@ -41,6 +65,10 @@ st.markdown(
41
 
42
 
43
 
 
 
 
 
44
  st.markdown("<h1 style='text-align: center; margin-bottom: 5px;'>Sing It Forward App🎵</h1>", unsafe_allow_html=True)
45
 
46
  description = """
 
24
  )
25
 
26
 
27
+ # background_image_url = "https://static.vecteezy.com/system/resources/previews/020/333/164/non_2x/stephen-foster-memorial-day-illustration-with-copy-space-area-and-blue-background-suitable-to-use-on-memorial-day-event-vector.jpg"
28
+ # st.markdown(
29
+ # f"""
30
+ # <style>
31
+ # .stApp {{
32
+ # background-image: url("{background_image_url}");
33
+ # background-size: cover;
34
+ # background-position: center;
35
+ # background-repeat: no-repeat;
36
+ # }}
37
+ # </style>
38
+ # """,
39
+ # unsafe_allow_html=True
40
+ # )
41
+
42
+ import base64
43
+
44
+ def load_image(image_file):
45
+ with open(image_file, "rb") as f:
46
+ return f.read()
47
+
48
+ image_data = load_image("bcg.jpg")
49
+ image_base64 = base64.b64encode(image_data).decode()
50
+
51
+
52
  st.markdown(
53
  f"""
54
  <style>
55
  .stApp {{
56
+ background-image: url(data:image/jpeg;base64,{image_base64});
57
  background-size: cover;
58
  background-position: center;
59
  background-repeat: no-repeat;
 
65
 
66
 
67
 
68
+
69
+
70
+
71
+
72
  st.markdown("<h1 style='text-align: center; margin-bottom: 5px;'>Sing It Forward App🎵</h1>", unsafe_allow_html=True)
73
 
74
  description = """