Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,11 +10,24 @@ def app():
|
|
| 10 |
|
| 11 |
# Create a sidebar for user to input sections
|
| 12 |
st.sidebar.title("Add Sections")
|
| 13 |
-
section = st.sidebar.text_input("Section")
|
| 14 |
-
section_phone_number = st.sidebar.text_input("Phone Number")
|
| 15 |
-
section_email = st.sidebar.text_input("Email")
|
| 16 |
add_section = st.sidebar.button('Add Section')
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# Initialize an empty dataframe
|
| 19 |
if 'data' not in st.session_state:
|
| 20 |
st.session_state['data'] = pd.DataFrame(columns=['Section', 'Phone Number', 'Email'])
|
|
|
|
| 10 |
|
| 11 |
# Create a sidebar for user to input sections
|
| 12 |
st.sidebar.title("Add Sections")
|
| 13 |
+
section = st.sidebar.text_input("Section", key="section_input")
|
| 14 |
+
section_phone_number = st.sidebar.text_input("Phone Number", key="phone_input")
|
| 15 |
+
section_email = st.sidebar.text_input("Email", key="email_input")
|
| 16 |
add_section = st.sidebar.button('Add Section')
|
| 17 |
|
| 18 |
+
# Apply styling to input areas
|
| 19 |
+
st.markdown(
|
| 20 |
+
"""
|
| 21 |
+
<style>
|
| 22 |
+
.stTextInput input,
|
| 23 |
+
.stTextArea textarea {
|
| 24 |
+
box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
|
| 25 |
+
}
|
| 26 |
+
</style>
|
| 27 |
+
""",
|
| 28 |
+
unsafe_allow_html=True
|
| 29 |
+
)
|
| 30 |
+
|
| 31 |
# Initialize an empty dataframe
|
| 32 |
if 'data' not in st.session_state:
|
| 33 |
st.session_state['data'] = pd.DataFrame(columns=['Section', 'Phone Number', 'Email'])
|