AIdeaText commited on
Commit
9612ba3
verified
1 Parent(s): 613394f

Update modules/ui/ui.py

Browse files
Files changed (1) hide show
  1. modules/ui/ui.py +4 -3
modules/ui/ui.py CHANGED
@@ -293,13 +293,14 @@ def display_student_progress(username, lang_code='es'):
293
  if 'relations_graph' in entry:
294
  try:
295
  # Intentar decodificar la imagen si est谩 en formato base64
296
- #image_bytes = base64.b64decode(entry['relations_graph'])
297
- st.image(f"data:image/png;base64,{entry['relations_graph']}")
298
  st.image(image_bytes)
299
  except Exception as e:
300
  st.error(f"No se pudo mostrar la imagen: {str(e)}")
301
  st.write("Datos de la imagen (para depuraci贸n):")
302
- st.write(entry['relations_graph'][:100] + "...")
 
 
303
 
304
  ##########################################################
305
  with st.expander("Hist贸rico de An谩lisis Discursivos"):
 
293
  if 'relations_graph' in entry:
294
  try:
295
  # Intentar decodificar la imagen si est谩 en formato base64
296
+ image_bytes = base64.b64decode(entry['relations_graph'])
 
297
  st.image(image_bytes)
298
  except Exception as e:
299
  st.error(f"No se pudo mostrar la imagen: {str(e)}")
300
  st.write("Datos de la imagen (para depuraci贸n):")
301
+ st.write(entry['relations_graph'][:100] + "...")
302
+ else:
303
+ st.write("No se encontr贸 el gr谩fico para este an谩lisis.")
304
 
305
  ##########################################################
306
  with st.expander("Hist贸rico de An谩lisis Discursivos"):