Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -246,31 +246,26 @@ def page1():
|
|
246 |
"""
|
247 |
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
248 |
|
249 |
-
|
250 |
col1, col2 = st.columns([3, 1]) # Adjust the ratio to your liking
|
251 |
|
252 |
with col1:
|
253 |
st.title("Alles zur aktuellen Krankenhausreform!")
|
254 |
|
255 |
with col2:
|
256 |
-
#
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
st.error(f"File not found. Please check the file path. Attempted path: {image_path}")
|
270 |
-
except Exception as e:
|
271 |
-
st.error(f"An unexpected error occurred while loading the image: {e}")
|
272 |
-
|
273 |
-
|
274 |
|
275 |
if not os.path.exists(pdf_path):
|
276 |
st.error("File not found. Please check the file path.")
|
@@ -278,6 +273,7 @@ def page1():
|
|
278 |
|
279 |
VectorStore = load_vector_store(pdf_path, "KH_Reform_2301", force_reload=False)
|
280 |
|
|
|
281 |
display_chat_history(st.session_state['chat_history_page1'])
|
282 |
|
283 |
st.write("<!-- Start Spacer -->", unsafe_allow_html=True)
|
|
|
246 |
"""
|
247 |
st.markdown(hide_streamlit_style, unsafe_allow_html=True)
|
248 |
|
249 |
+
# Create columns for layout
|
250 |
col1, col2 = st.columns([3, 1]) # Adjust the ratio to your liking
|
251 |
|
252 |
with col1:
|
253 |
st.title("Alles zur aktuellen Krankenhausreform!")
|
254 |
|
255 |
with col2:
|
256 |
+
# Attempt to load the image with enhanced error handling
|
257 |
+
try:
|
258 |
+
# Construct the absolute path to the image file
|
259 |
+
current_dir = os.getcwd() # Get the current working directory
|
260 |
+
image_path = os.path.join(current_dir, 'BinDoc Logo (Quadratisch).png')
|
261 |
+
|
262 |
+
# Load and display the image
|
263 |
+
image = Image.open(image_path)
|
264 |
+
st.image(image, use_column_width='always')
|
265 |
+
except FileNotFoundError:
|
266 |
+
st.error(f"File not found. Please check the file path. Attempted path: {image_path}")
|
267 |
+
except Exception as e:
|
268 |
+
st.error(f"An unexpected error occurred while loading the image: {e}")
|
|
|
|
|
|
|
|
|
|
|
269 |
|
270 |
if not os.path.exists(pdf_path):
|
271 |
st.error("File not found. Please check the file path.")
|
|
|
273 |
|
274 |
VectorStore = load_vector_store(pdf_path, "KH_Reform_2301", force_reload=False)
|
275 |
|
276 |
+
|
277 |
display_chat_history(st.session_state['chat_history_page1'])
|
278 |
|
279 |
st.write("<!-- Start Spacer -->", unsafe_allow_html=True)
|