Update modules/ui/ui.py
Browse files- modules/ui/ui.py +12 -5
modules/ui/ui.py
CHANGED
@@ -274,7 +274,8 @@ def display_student_progress(username, lang_code='es'):
|
|
274 |
ax.set_xlabel("Fecha")
|
275 |
ax.set_ylabel("Cantidad de an谩lisis")
|
276 |
st.pyplot(fig)
|
277 |
-
|
|
|
278 |
with st.expander("Hist贸rico de An谩lisis Morfosint谩cticos"):
|
279 |
morphosyntax_entries = [entry for entry in student_data['entries'] if entry['analysis_type'] == 'morphosyntax']
|
280 |
for entry in morphosyntax_entries:
|
@@ -282,6 +283,8 @@ def display_student_progress(username, lang_code='es'):
|
|
282 |
if entry['arc_diagrams']:
|
283 |
st.write(entry['arc_diagrams'][0], unsafe_allow_html=True)
|
284 |
|
|
|
|
|
285 |
with st.expander("Hist贸rico de An谩lisis Sem谩nticos"):
|
286 |
semantic_entries = [entry for entry in student_data['entries'] if entry['analysis_type'] == 'semantic']
|
287 |
for entry in semantic_entries:
|
@@ -290,13 +293,15 @@ def display_student_progress(username, lang_code='es'):
|
|
290 |
if 'network_diagram' in entry:
|
291 |
try:
|
292 |
# Intentar decodificar la imagen si est谩 en formato base64
|
293 |
-
image_bytes = base64.b64decode(entry['network_diagram'])
|
294 |
-
st.image(
|
|
|
295 |
except Exception as e:
|
296 |
st.error(f"No se pudo mostrar la imagen: {str(e)}")
|
297 |
st.write("Datos de la imagen (para depuraci贸n):")
|
298 |
-
st.write(entry['network_diagram'][:100] + "...")
|
299 |
-
|
|
|
300 |
with st.expander("Hist贸rico de An谩lisis Discursivos"):
|
301 |
discourse_entries = [entry for entry in student_data['entries'] if entry['analysis_type'] == 'discourse']
|
302 |
for entry in discourse_entries:
|
@@ -342,6 +347,8 @@ def display_student_progress(username, lang_code='es'):
|
|
342 |
if 'combined_graph' in entry:
|
343 |
st.write("Combined Graph:", entry['combined_graph'][:100] + "...")
|
344 |
|
|
|
|
|
345 |
with st.expander("Hist贸rico de Conversaciones con el ChatBot"):
|
346 |
if 'chat_history' in student_data:
|
347 |
for i, chat in enumerate(student_data['chat_history']):
|
|
|
274 |
ax.set_xlabel("Fecha")
|
275 |
ax.set_ylabel("Cantidad de an谩lisis")
|
276 |
st.pyplot(fig)
|
277 |
+
|
278 |
+
##########################################################
|
279 |
with st.expander("Hist贸rico de An谩lisis Morfosint谩cticos"):
|
280 |
morphosyntax_entries = [entry for entry in student_data['entries'] if entry['analysis_type'] == 'morphosyntax']
|
281 |
for entry in morphosyntax_entries:
|
|
|
283 |
if entry['arc_diagrams']:
|
284 |
st.write(entry['arc_diagrams'][0], unsafe_allow_html=True)
|
285 |
|
286 |
+
|
287 |
+
##########################################################
|
288 |
with st.expander("Hist贸rico de An谩lisis Sem谩nticos"):
|
289 |
semantic_entries = [entry for entry in student_data['entries'] if entry['analysis_type'] == 'semantic']
|
290 |
for entry in semantic_entries:
|
|
|
293 |
if 'network_diagram' in entry:
|
294 |
try:
|
295 |
# Intentar decodificar la imagen si est谩 en formato base64
|
296 |
+
#image_bytes = base64.b64decode(entry['network_diagram'])
|
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['network_diagram'][:100] + "...")
|
303 |
+
|
304 |
+
##########################################################
|
305 |
with st.expander("Hist贸rico de An谩lisis Discursivos"):
|
306 |
discourse_entries = [entry for entry in student_data['entries'] if entry['analysis_type'] == 'discourse']
|
307 |
for entry in discourse_entries:
|
|
|
347 |
if 'combined_graph' in entry:
|
348 |
st.write("Combined Graph:", entry['combined_graph'][:100] + "...")
|
349 |
|
350 |
+
|
351 |
+
##########################################################
|
352 |
with st.expander("Hist贸rico de Conversaciones con el ChatBot"):
|
353 |
if 'chat_history' in student_data:
|
354 |
for i, chat in enumerate(student_data['chat_history']):
|