Updated reading css
Browse files- src/streamlit_app.py +14 -4
src/streamlit_app.py
CHANGED
|
@@ -11,11 +11,21 @@ st.set_page_config(
|
|
| 11 |
)
|
| 12 |
|
| 13 |
# ββ Custom CSS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 14 |
-
with open('./style.css.txt', 'r') as file:
|
| 15 |
-
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
-
st.markdown(csstext, unsafe_allow_html=True)
|
| 19 |
|
| 20 |
"""st.markdown("""
|
| 21 |
"""<style>
|
|
|
|
| 11 |
)
|
| 12 |
|
| 13 |
# ββ Custom CSS ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 14 |
+
# with open('./style.css.txt', 'r') as file:
|
| 15 |
+
# csstext = file.read()
|
| 16 |
+
# #print(content)
|
| 17 |
+
|
| 18 |
+
# st.markdown(csstext, unsafe_allow_html=True)
|
| 19 |
+
|
| 20 |
+
def local_css(file_name):
|
| 21 |
+
with open(file_name) as f:
|
| 22 |
+
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
|
| 23 |
+
|
| 24 |
+
# Call the function at the top of your app
|
| 25 |
+
local_css("./style.css")
|
| 26 |
+
st.title("RainyTrek")
|
| 27 |
+
|
| 28 |
|
|
|
|
| 29 |
|
| 30 |
"""st.markdown("""
|
| 31 |
"""<style>
|