Update src/streamlit_app.py
Browse files14 unmodified lines1516171819202122232425262728293031323334353637383940414243444546474849505152535414 unmodified linesif not os.path.exists(MODEL_PATH):st.error(f"Model file not found at: {MODEL_PATH}")st.stop()st.write(f"Current working directory: {os.getcwd()}")st.write(f"Looking for model at: {os.path.abspath(MODEL_PATH)}")# Check if the parent directory (..) exists and list its contentsparent_dir = os.path.join(os.getcwd(), '..')st.write(f"Does parent directory (..) exist: {os.path.exists(parent_dir)}")if os.path.exists(parent_dir):try:st.write(f"Contents of parent directory (..): {os.listdir(parent_dir)}")except Exception as e:st.write(f"Error listing parent directory: {e}")# Check if the models directory exists and list its contentsmodels_dir = os.path.join(os.getcwd(), '..', 'models')st.write(f"Does models directory exist: {os.path.exists(models_dir)}")if os.path.exists(models_dir):try:st.write(f"Contents of models directory: {os.listdir(models_dir)}")except Exception as e:st.write(f"Error listing models directory: {e}")else:st.write('models directory not found at expected path.')# --- End of debugging lines ---if not os.path.exists(MODEL_PATH):st.error(f"Model file not found at: {MODEL_PATH}")st.stop()model = tf.keras.models.load_model(MODEL_PATH)if not os.path.exists(MODEL_PATH):14 unmodified lines1516171819202114 unmodified linesif not os.path.exists(MODEL_PATH):st.error(f"Model file not found at: {MODEL_PATH}")st.stop()model = tf.keras.models.load_model(MODEL_PATH)if not os.path.exists(MODEL_PATH):
src/streamlit_app.py+1-34