Spaces:
Running
Running
Commit
路
326b5e0
1
Parent(s):
aafeadf
Actualizar st.experimental_rerun() a st.rerun() para compatibilidad con Streamlit 1.43.2
Browse files- streamlit_app.py +5 -5
streamlit_app.py
CHANGED
|
@@ -1588,7 +1588,7 @@ def main():
|
|
| 1588 |
st.image(cv2.cvtColor(processed_image, cv2.COLOR_BGR2RGB), caption=f"Registered face: {person_name}")
|
| 1589 |
|
| 1590 |
# Forzar recarga de la interfaz para mostrar el rostro registrado
|
| 1591 |
-
st.
|
| 1592 |
else:
|
| 1593 |
st.error("Failed to extract embeddings. Please try again with a clearer image.")
|
| 1594 |
|
|
@@ -1654,7 +1654,7 @@ def main():
|
|
| 1654 |
save_face_database(st.session_state.face_database)
|
| 1655 |
|
| 1656 |
st.success(f"Deleted {row['Name']} from the database.")
|
| 1657 |
-
st.
|
| 1658 |
|
| 1659 |
# Bot贸n para eliminar todos los registros
|
| 1660 |
if st.button("Delete All Registered Faces"):
|
|
@@ -1675,11 +1675,11 @@ def main():
|
|
| 1675 |
|
| 1676 |
st.session_state.confirm_delete_all = False
|
| 1677 |
st.success("All registered faces have been deleted.")
|
| 1678 |
-
st.
|
| 1679 |
with col2:
|
| 1680 |
if st.button("Cancel"):
|
| 1681 |
st.session_state.confirm_delete_all = False
|
| 1682 |
-
st.
|
| 1683 |
else:
|
| 1684 |
st.info("No faces registered yet. Use the form above to register faces.")
|
| 1685 |
else:
|
|
@@ -1717,7 +1717,7 @@ def main():
|
|
| 1717 |
# Guardar la base de datos actualizada
|
| 1718 |
if save_face_database(st.session_state.face_database):
|
| 1719 |
st.success("Database imported and saved successfully!")
|
| 1720 |
-
st.
|
| 1721 |
|
| 1722 |
with tab2:
|
| 1723 |
st.header("Image Recognition")
|
|
|
|
| 1588 |
st.image(cv2.cvtColor(processed_image, cv2.COLOR_BGR2RGB), caption=f"Registered face: {person_name}")
|
| 1589 |
|
| 1590 |
# Forzar recarga de la interfaz para mostrar el rostro registrado
|
| 1591 |
+
st.rerun()
|
| 1592 |
else:
|
| 1593 |
st.error("Failed to extract embeddings. Please try again with a clearer image.")
|
| 1594 |
|
|
|
|
| 1654 |
save_face_database(st.session_state.face_database)
|
| 1655 |
|
| 1656 |
st.success(f"Deleted {row['Name']} from the database.")
|
| 1657 |
+
st.rerun()
|
| 1658 |
|
| 1659 |
# Bot贸n para eliminar todos los registros
|
| 1660 |
if st.button("Delete All Registered Faces"):
|
|
|
|
| 1675 |
|
| 1676 |
st.session_state.confirm_delete_all = False
|
| 1677 |
st.success("All registered faces have been deleted.")
|
| 1678 |
+
st.rerun()
|
| 1679 |
with col2:
|
| 1680 |
if st.button("Cancel"):
|
| 1681 |
st.session_state.confirm_delete_all = False
|
| 1682 |
+
st.rerun()
|
| 1683 |
else:
|
| 1684 |
st.info("No faces registered yet. Use the form above to register faces.")
|
| 1685 |
else:
|
|
|
|
| 1717 |
# Guardar la base de datos actualizada
|
| 1718 |
if save_face_database(st.session_state.face_database):
|
| 1719 |
st.success("Database imported and saved successfully!")
|
| 1720 |
+
st.rerun()
|
| 1721 |
|
| 1722 |
with tab2:
|
| 1723 |
st.header("Image Recognition")
|