Update app.py
Browse files
app.py
CHANGED
@@ -941,7 +941,8 @@ with tabs[1]:
|
|
941 |
with open(filename, "wb") as f: f.write(cam0_img.getvalue())
|
942 |
st.session_state['cam0_file'] = filename; st.session_state['history'].append(f"Snapshot from Cam 0: {filename}"); st.image(Image.open(filename), caption="Camera 0 Snap", use_container_width=True); logger.info(f"Saved snapshot from Camera 0: {filename}"); st.success(f"Saved {filename}")
|
943 |
update_gallery(); st.rerun()
|
944 |
-
except Exception as e:
|
|
|
945 |
with cols[1]:
|
946 |
cam1_img = st.camera_input("Take a picture - Cam 1", key="main_cam1")
|
947 |
if cam1_img:
|
|
|
941 |
with open(filename, "wb") as f: f.write(cam0_img.getvalue())
|
942 |
st.session_state['cam0_file'] = filename; st.session_state['history'].append(f"Snapshot from Cam 0: {filename}"); st.image(Image.open(filename), caption="Camera 0 Snap", use_container_width=True); logger.info(f"Saved snapshot from Camera 0: {filename}"); st.success(f"Saved {filename}")
|
943 |
update_gallery(); st.rerun()
|
944 |
+
except Exception as e:
|
945 |
+
st.error(f"Failed to save Cam 0 snap: {e}"); logger.error(f"Failed to save Cam 0 snap {filename}: {e}")
|
946 |
with cols[1]:
|
947 |
cam1_img = st.camera_input("Take a picture - Cam 1", key="main_cam1")
|
948 |
if cam1_img:
|