Update app.py
Browse files
app.py
CHANGED
|
@@ -1,41 +1,38 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
custom_css = f"""
|
| 6 |
<style>
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
/* Additional fixes specific to Hugging Face embedding */
|
| 34 |
-
section[data-testid="stSidebar"] {
|
| 35 |
-
z-index: 0;
|
| 36 |
-
}
|
| 37 |
</style>
|
| 38 |
"""
|
|
|
|
|
|
|
| 39 |
st.markdown(custom_css, unsafe_allow_html=True)
|
| 40 |
|
| 41 |
# Create a custom header at the very top (this is key)
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
# Fix the CSS to avoid parsing errors
|
| 4 |
+
custom_css = """
|
|
|
|
| 5 |
<style>
|
| 6 |
+
div.block-container {
|
| 7 |
+
padding-top: 1rem;
|
| 8 |
+
}
|
| 9 |
+
|
| 10 |
+
div[data-testid="stDecoratedAppViewContainer"] > div:first-child {
|
| 11 |
+
position: sticky !important;
|
| 12 |
+
top: 0 !important;
|
| 13 |
+
background-color: white;
|
| 14 |
+
z-index: 999;
|
| 15 |
+
padding: 0px !important;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.custom-header {
|
| 19 |
+
background-color: #90EE90;
|
| 20 |
+
padding: 1rem;
|
| 21 |
+
border-bottom: 1px solid #ddd;
|
| 22 |
+
width: 100%;
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
header[data-testid="stHeader"] {
|
| 26 |
+
display: none;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
section[data-testid="stSidebar"] {
|
| 30 |
+
z-index: 0;
|
| 31 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
</style>
|
| 33 |
"""
|
| 34 |
+
|
| 35 |
+
# Apply the CSS with proper escaping
|
| 36 |
st.markdown(custom_css, unsafe_allow_html=True)
|
| 37 |
|
| 38 |
# Create a custom header at the very top (this is key)
|