Update src/streamlit_app.py
Browse files11 unmodified lines1213141516171819202122232425262728293031323334353637383911 unmodified lines# ========== Load Model ==========MODEL_PATH = os.path.join("src", "models", "model.h5") # This is the current correct path# --- Debugging Lines ---st.write(f"Current working directory: {os.getcwd()}")st.write(f"Absolute path being checked: {os.path.abspath(MODEL_PATH)}")# List contents of the current working directorytry:st.write(f"Contents of CWD ({os.getcwd()}): {os.listdir(os.getcwd())}")except Exception as e:st.write(f"Error listing CWD: {e}")# List contents of the 'models' directory if it existsmodels_dir_abs = os.path.join(os.getcwd(), "models")st.write(f"Does 'models' directory exist at {models_dir_abs}: {os.path.exists(models_dir_abs)}")if os.path.exists(models_dir_abs):try:st.write(f"Contents of 'models' directory: {os.listdir(models_dir_abs)}")except Exception as e:st.write(f"Error listing 'models' directory: {e}")else:st.write("The 'models' directory itself was not found in CWD.")# --- End Debugging Lines ---if not os.path.exists(MODEL_PATH):st.error(f"Model file not found at: {MODEL_PATH}")st.stop()11 unmodified lines12131415161711 unmodified lines# ========== Load Model ==========MODEL_PATH = os.path.join("src", "models", "model.h5") # This is the current correct pathif not os.path.exists(MODEL_PATH):st.error(f"Model file not found at: {MODEL_PATH}")st.stop()
src/streamlit_app.py-22