Spaces:
Runtime error
Runtime error
Upload utils.py
Browse files
utils.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
|
| 3 |
+
def initialize_session_state():
|
| 4 |
+
"""Initialize session state variables."""
|
| 5 |
+
if 'history' not in st.session_state:
|
| 6 |
+
st.session_state.history = []
|
| 7 |
+
|
| 8 |
+
def load_css():
|
| 9 |
+
"""Load custom CSS styles."""
|
| 10 |
+
st.markdown("""
|
| 11 |
+
<style>
|
| 12 |
+
.stButton>button {
|
| 13 |
+
width: 100%;
|
| 14 |
+
background-color: #FF4B4B;
|
| 15 |
+
color: white;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.stTextInput>div>div>input {
|
| 19 |
+
border-radius: 5px;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.stMarkdown {
|
| 23 |
+
font-family: 'Arial', sans-serif;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
h1, h2, h3 {
|
| 27 |
+
color: #262730;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
.sidebar .sidebar-content {
|
| 31 |
+
background-color: #F0F2F6;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.stExpander {
|
| 35 |
+
background-color: white;
|
| 36 |
+
border-radius: 5px;
|
| 37 |
+
margin-bottom: 10px;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
.stRadio > div {
|
| 41 |
+
display: flex;
|
| 42 |
+
gap: 1rem;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
.stSelectbox {
|
| 46 |
+
margin-bottom: 1rem;
|
| 47 |
+
}
|
| 48 |
+
</style>
|
| 49 |
+
""", unsafe_allow_html=True)
|