Update modules/ui/user_page.py
Browse files- modules/ui/user_page.py +10 -1
modules/ui/user_page.py
CHANGED
|
@@ -55,6 +55,15 @@ from ..database.mongo_db import (
|
|
| 55 |
delete_document
|
| 56 |
)
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
from ..database.chat_mongo_db import store_chat_history, get_chat_history
|
| 60 |
|
|
@@ -82,7 +91,7 @@ def user_page(lang_code, t):
|
|
| 82 |
if 'user_data' not in st.session_state:
|
| 83 |
with st.spinner(t.get('loading_data', "Cargando tus datos...")):
|
| 84 |
try:
|
| 85 |
-
st.session_state.user_data =
|
| 86 |
st.session_state.last_data_fetch = datetime.now(timezone.utc).isoformat()
|
| 87 |
except Exception as e:
|
| 88 |
logger.error(f"Error al obtener datos del usuario: {str(e)}")
|
|
|
|
| 55 |
delete_document
|
| 56 |
)
|
| 57 |
|
| 58 |
+
from ..database.semantic_mongo_db import (
|
| 59 |
+
store_student_semantic_result,
|
| 60 |
+
get_student_semantic_analysis,
|
| 61 |
+
update_student_semantic_analysis,
|
| 62 |
+
delete_student_semantic_analysis,
|
| 63 |
+
get_student_semantic_data
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
|
| 67 |
|
| 68 |
from ..database.chat_mongo_db import store_chat_history, get_chat_history
|
| 69 |
|
|
|
|
| 91 |
if 'user_data' not in st.session_state:
|
| 92 |
with st.spinner(t.get('loading_data', "Cargando tus datos...")):
|
| 93 |
try:
|
| 94 |
+
st.session_state.user_data = get_student_semantic_data(st.session_state.username)
|
| 95 |
st.session_state.last_data_fetch = datetime.now(timezone.utc).isoformat()
|
| 96 |
except Exception as e:
|
| 97 |
logger.error(f"Error al obtener datos del usuario: {str(e)}")
|