Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -501,9 +501,24 @@ def page2():
|
|
501 |
|
502 |
def page3():
|
503 |
try:
|
504 |
-
#
|
505 |
st.title("Kosten- und Strukturdaten der Krankenhäuser")
|
506 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
507 |
# Simple interaction
|
508 |
if st.button("Test Button"):
|
509 |
st.write("Button clicked.")
|
@@ -513,6 +528,7 @@ def page3():
|
|
513 |
|
514 |
|
515 |
|
|
|
516 |
def page4():
|
517 |
try:
|
518 |
st.header(":mailbox: Kontakt & Feedback!")
|
|
|
501 |
|
502 |
def page3():
|
503 |
try:
|
504 |
+
# Basic layout setup
|
505 |
st.title("Kosten- und Strukturdaten der Krankenhäuser")
|
506 |
|
507 |
+
# Initialize CromA client
|
508 |
+
chroma_client = chromadb.Client()
|
509 |
+
|
510 |
+
# Check if the collection already exists
|
511 |
+
try:
|
512 |
+
# Attempt to create the collection
|
513 |
+
collection = chroma_client.create_collection(name="Kosten_Strukturdaten0602204")
|
514 |
+
except Exception as e:
|
515 |
+
# If the collection already exists, fetch the existing collection
|
516 |
+
if 'already exists' in str(e):
|
517 |
+
collection = chroma_client.get_collection(name="Kosten_Strukturdaten0602204")
|
518 |
+
else:
|
519 |
+
# If the error is due to some other reason, re-raise the exception
|
520 |
+
raise e
|
521 |
+
|
522 |
# Simple interaction
|
523 |
if st.button("Test Button"):
|
524 |
st.write("Button clicked.")
|
|
|
528 |
|
529 |
|
530 |
|
531 |
+
|
532 |
def page4():
|
533 |
try:
|
534 |
st.header(":mailbox: Kontakt & Feedback!")
|