Spaces:
Sleeping
Sleeping
Update Diet.py
#2
by Nazeer-1 - opened
Diet.py
CHANGED
|
@@ -6,16 +6,16 @@ def set_background_local(image_file):
|
|
| 6 |
data = f.read()
|
| 7 |
encoded = base64.b64encode(data).decode()
|
| 8 |
css = f"""
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
st.markdown(css, unsafe_allow_html=True)
|
| 20 |
|
| 21 |
# 👇 Set background image here
|
|
|
|
| 6 |
data = f.read()
|
| 7 |
encoded = base64.b64encode(data).decode()
|
| 8 |
css = f"""
|
| 9 |
+
<style>
|
| 10 |
+
.stApp {{
|
| 11 |
+
background-image: url("data:image/jpg;base64,{encoded}");
|
| 12 |
+
background-size: 90% auto;
|
| 13 |
+
background-position: left center;
|
| 14 |
+
background-repeat: no-repeat;
|
| 15 |
+
background-attachment: fixed;
|
| 16 |
+
}}
|
| 17 |
+
</style>
|
| 18 |
+
"""
|
| 19 |
st.markdown(css, unsafe_allow_html=True)
|
| 20 |
|
| 21 |
# 👇 Set background image here
|