Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,7 +46,7 @@ pdf_path = "Private_Book/09012024_Kombi_2.pdf" # Replace with your PDF file pat
|
|
| 46 |
|
| 47 |
pdf_path2 = "Private_Book/KH_Reform_230124.pdf"
|
| 48 |
|
| 49 |
-
pdf_path3 = "Private_Book/
|
| 50 |
|
| 51 |
api_key = os.getenv("OPENAI_API_KEY")
|
| 52 |
# Retrieve the API key from st.secrets
|
|
@@ -408,7 +408,7 @@ def page3():
|
|
| 408 |
col1, col2 = st.columns([3, 1]) # Adjust the ratio to your liking
|
| 409 |
|
| 410 |
with col1:
|
| 411 |
-
st.title("
|
| 412 |
|
| 413 |
with col2:
|
| 414 |
# Load and display the image in the right column, which will be the top-right corner of the page
|
|
@@ -423,7 +423,7 @@ def page3():
|
|
| 423 |
st.error("File not found. Please check the file path.")
|
| 424 |
return
|
| 425 |
|
| 426 |
-
VectorStore = load_vector_store(pdf_path3, "
|
| 427 |
|
| 428 |
|
| 429 |
|
|
@@ -443,21 +443,21 @@ def page3():
|
|
| 443 |
col1, col2 = st.columns(2)
|
| 444 |
|
| 445 |
with col1:
|
| 446 |
-
if st.button("
|
| 447 |
-
query = "
|
| 448 |
-
if st.button("
|
| 449 |
-
query = ("
|
| 450 |
-
if st.button("
|
| 451 |
-
query = "
|
| 452 |
|
| 453 |
|
| 454 |
with col2:
|
| 455 |
-
if st.button("
|
| 456 |
-
query = "
|
| 457 |
-
if st.button("
|
| 458 |
-
query = "
|
| 459 |
-
if st.button("
|
| 460 |
-
query = "
|
| 461 |
|
| 462 |
|
| 463 |
if query:
|
|
@@ -512,7 +512,7 @@ def main():
|
|
| 512 |
st.title('BinDoc GmbH')
|
| 513 |
st.markdown("Experience revolutionary interaction with BinDocs Chat App, leveraging state-of-the-art AI technology.")
|
| 514 |
add_vertical_space(1)
|
| 515 |
-
page = st.sidebar.selectbox("Choose a page", ["Document Analysis Bot", "KH_Reform", "
|
| 516 |
add_vertical_space(1)
|
| 517 |
st.write('Made with ❤️ by BinDoc GmbH')
|
| 518 |
|
|
@@ -521,7 +521,7 @@ def main():
|
|
| 521 |
page1()
|
| 522 |
elif page == "KH_Reform":
|
| 523 |
page2()
|
| 524 |
-
elif page == "
|
| 525 |
page3()
|
| 526 |
|
| 527 |
|
|
|
|
| 46 |
|
| 47 |
pdf_path2 = "Private_Book/KH_Reform_230124.pdf"
|
| 48 |
|
| 49 |
+
pdf_path3 = "Private_Book/Buch_23012024.pdf"
|
| 50 |
|
| 51 |
api_key = os.getenv("OPENAI_API_KEY")
|
| 52 |
# Retrieve the API key from st.secrets
|
|
|
|
| 408 |
col1, col2 = st.columns([3, 1]) # Adjust the ratio to your liking
|
| 409 |
|
| 410 |
with col1:
|
| 411 |
+
st.title("Kennzahlenbuch 100 Kennzahlen!")
|
| 412 |
|
| 413 |
with col2:
|
| 414 |
# Load and display the image in the right column, which will be the top-right corner of the page
|
|
|
|
| 423 |
st.error("File not found. Please check the file path.")
|
| 424 |
return
|
| 425 |
|
| 426 |
+
VectorStore = load_vector_store(pdf_path3, "Buch_vector_store", force_reload=False)
|
| 427 |
|
| 428 |
|
| 429 |
|
|
|
|
| 443 |
col1, col2 = st.columns(2)
|
| 444 |
|
| 445 |
with col1:
|
| 446 |
+
if st.button("Nenne mir 5 wichtige Personalkennzahlen im Krankenhaus."):
|
| 447 |
+
query = "Nenne mir 5 wichtige Personalkennzahlen im Krankenhaus."
|
| 448 |
+
if st.button("Wie ist die durchschnittliche Bettenauslastung eines Krankenhauses?"):
|
| 449 |
+
query = ("Wie ist die durchschnittliche Bettenauslastung eines Krankenhauses?")
|
| 450 |
+
if st.button("Welches sind die häufigsten DRGs, die von den Krankenhäusern abgerechnet werden?"):
|
| 451 |
+
query = "Welches sind die häufigsten DRGs, die von den Krankenhäusern abgerechnet werden? "
|
| 452 |
|
| 453 |
|
| 454 |
with col2:
|
| 455 |
+
if st.button("Wieviel Casemixpunkte werden im Median von einer ärztlichen Vollkraft erbracht?"):
|
| 456 |
+
query = "Wieviel Casemixpunkte werden im Median von einer ärztlichen Vollkraft erbracht?"
|
| 457 |
+
if st.button("Bitte erstelle mir einer Übersicht der wichtiger Strukturkennzahlen eines Krankenhauses der Grund- und Regelversorgung."):
|
| 458 |
+
query = "Bitte erstelle mir einer Übersicht der wichtiger Strukturkennzahlen eines Krankenhauses der Grund- und Regelversorgung."
|
| 459 |
+
if st.button("Wieviele Patienten eines Grund- und Regelversorgers kommen aus welcher Fahrzeitzone?"):
|
| 460 |
+
query = "Wieviele Patienten eines Grund- und Regelversorgers kommen aus welcher Fahrzeitzone?"
|
| 461 |
|
| 462 |
|
| 463 |
if query:
|
|
|
|
| 512 |
st.title('BinDoc GmbH')
|
| 513 |
st.markdown("Experience revolutionary interaction with BinDocs Chat App, leveraging state-of-the-art AI technology.")
|
| 514 |
add_vertical_space(1)
|
| 515 |
+
page = st.sidebar.selectbox("Choose a page", ["Document Analysis Bot", "KH_Reform", "Kennzahlenbuch 100 Kennzahlen"])
|
| 516 |
add_vertical_space(1)
|
| 517 |
st.write('Made with ❤️ by BinDoc GmbH')
|
| 518 |
|
|
|
|
| 521 |
page1()
|
| 522 |
elif page == "KH_Reform":
|
| 523 |
page2()
|
| 524 |
+
elif page == "Kennzahlenbuch 100 Kennzahlen":
|
| 525 |
page3()
|
| 526 |
|
| 527 |
|