Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -250,12 +250,12 @@ def display_collection_dialog():
|
|
| 250 |
"""Display the create collection dialog."""
|
| 251 |
with st.sidebar:
|
| 252 |
st.subheader("Create New Collection")
|
| 253 |
-
name = st.text_input("Collection Name")
|
| 254 |
-
description = st.text_area("Description")
|
| 255 |
|
| 256 |
col1, col2 = st.columns(2)
|
| 257 |
with col1:
|
| 258 |
-
if st.button("Create"):
|
| 259 |
if name:
|
| 260 |
if create_collection(st.session_state.db_conn, name, description):
|
| 261 |
st.success(f"Collection '{name}' created!")
|
|
@@ -265,7 +265,7 @@ def display_collection_dialog():
|
|
| 265 |
st.error("Please enter a collection name")
|
| 266 |
|
| 267 |
with col2:
|
| 268 |
-
if st.button("Cancel"):
|
| 269 |
st.session_state.show_collection_dialog = False
|
| 270 |
st.rerun()
|
| 271 |
|
|
|
|
| 250 |
"""Display the create collection dialog."""
|
| 251 |
with st.sidebar:
|
| 252 |
st.subheader("Create New Collection")
|
| 253 |
+
name = st.text_input("Collection Name", key="sidebar_collection_name")
|
| 254 |
+
description = st.text_area("Description", key="sidebar_collection_desc")
|
| 255 |
|
| 256 |
col1, col2 = st.columns(2)
|
| 257 |
with col1:
|
| 258 |
+
if st.button("Create", key="sidebar_create_btn"):
|
| 259 |
if name:
|
| 260 |
if create_collection(st.session_state.db_conn, name, description):
|
| 261 |
st.success(f"Collection '{name}' created!")
|
|
|
|
| 265 |
st.error("Please enter a collection name")
|
| 266 |
|
| 267 |
with col2:
|
| 268 |
+
if st.button("Cancel", key="sidebar_cancel_btn"):
|
| 269 |
st.session_state.show_collection_dialog = False
|
| 270 |
st.rerun()
|
| 271 |
|