Update src/streamlit_app.py
Browse files3 unmodified lines4567891011121314151617181920214 unmodified lines2627282930313233343 unmodified linesfrom PIL import Imageimport osBASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))MODEL_PATH = os.path.join(BASE_DIR, "facial_keypoints_resnet.h5")st.set_page_config(page_title="Facial Keypoints Detection",layout="centered")st.write("Files in current directory:")st.write(os.listdir(BASE_DIR))@st.cache_resourcedef load_model():return tf.keras.models.load_model(4 unmodified linesst.title("Facial Keypoints Detection")st.write("Upload a face image and the model will predict facial keypoints.")model = load_model()uploaded_file = st.file_uploader("Upload an image",type=["jpg", "png", "jpeg"]3 unmodified lines45678910111213141516174 unmodified lines2223242526272829303 unmodified linesfrom PIL import Imageimport os# 👇 HIER PLAATSEN (boven load_model)MODEL_PATH = "/app/src/facial_keypoints_resnet.h5"st.set_page_config(page_title="Facial Keypoints Detection",layout="centered")@st.cache_resourcedef load_model():return tf.keras.models.load_model(4 unmodified linesst.title("Facial Keypoints Detection")st.write("Upload a face image and the model will predict facial keypoints.")model = load_model()uploaded_file = st.file_uploader("Upload an image",type=["jpg", "png", "jpeg"]
src/streamlit_app.py+3-7