AIdeaText commited on
Commit
f425050
1 Parent(s): a25382b
modules/studentact/student_activities_v2.py CHANGED
@@ -271,7 +271,8 @@ def display_discourse_activities(username: str, t: dict):
271
  """
272
  st.markdown(concepts_html, unsafe_allow_html=True)
273
 
274
- if 'graph1' in analysis:
 
275
  try:
276
  # 3. Ajuste de imagen y ancho
277
  img1 = analysis['graph1']
@@ -300,7 +301,8 @@ def display_discourse_activities(username: str, t: dict):
300
  """
301
  st.markdown(concepts_html2, unsafe_allow_html=True)
302
 
303
- if 'graph2' in analysis:
 
304
  try:
305
  img2 = analysis['graph2']
306
  st.image(img2, width='stretch')
 
271
  """
272
  st.markdown(concepts_html, unsafe_allow_html=True)
273
 
274
+ #if 'graph1' in analysis:
275
+ if analysis.get('graph1'): # Esto verifica que exista y que NO sea None
276
  try:
277
  # 3. Ajuste de imagen y ancho
278
  img1 = analysis['graph1']
 
301
  """
302
  st.markdown(concepts_html2, unsafe_allow_html=True)
303
 
304
+ #if 'graph2' in analysis:
305
+ if analysis.get('graph2'): # Esto verifica que exista y que NO sea None
306
  try:
307
  img2 = analysis['graph2']
308
  st.image(img2, width='stretch')
modules/ui/user_page.py CHANGED
@@ -64,7 +64,8 @@ from ..database.semantic_mongo_db import (
64
  store_student_semantic_result,
65
  get_student_semantic_analysis,
66
  update_student_semantic_analysis,
67
- delete_student_semantic_analysis
 
68
  )
69
 
70
  from ..database.semantic_mongo_live_db import get_student_semantic_live_analysis
@@ -99,7 +100,7 @@ def user_page(lang_code, t):
99
  with st.spinner(t.get('loading_data', "Cargando tus datos...")):
100
  try:
101
  # Obtener datos sem谩nticos
102
- semantic_data = get_student_semantic_analysis(st.session_state.username)
103
 
104
  # Verificar si la operaci贸n fue exitosa
105
  if semantic_data.get('status') == 'error':
 
64
  store_student_semantic_result,
65
  get_student_semantic_analysis,
66
  update_student_semantic_analysis,
67
+ delete_student_semantic_analysis,
68
+ get_student_semantic_data
69
  )
70
 
71
  from ..database.semantic_mongo_live_db import get_student_semantic_live_analysis
 
100
  with st.spinner(t.get('loading_data', "Cargando tus datos...")):
101
  try:
102
  # Obtener datos sem谩nticos
103
+ semantic_data = get_student_semantic_data(st.session_state.username)
104
 
105
  # Verificar si la operaci贸n fue exitosa
106
  if semantic_data.get('status') == 'error':