Update modules/ui/ui.py
Browse files- modules/ui/ui.py +34 -36
modules/ui/ui.py
CHANGED
@@ -318,43 +318,41 @@ def user_page(lang_code, t):
|
|
318 |
for index, tab in enumerate(tabs):
|
319 |
if tab.selected:
|
320 |
st.session_state.selected_tab = index
|
321 |
-
|
322 |
with tab:
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
logger.error(f"Error en tab {index}: {str(e)}")
|
357 |
-
st.error(t.get('tab_error', 'Error al cargar esta secci贸n'))
|
358 |
|
359 |
# Panel de depuraci贸n (solo visible en desarrollo)
|
360 |
if st.session_state.get('debug_mode', False):
|
|
|
318 |
for index, tab in enumerate(tabs):
|
319 |
if tab.selected:
|
320 |
st.session_state.selected_tab = index
|
321 |
+
|
322 |
with tab:
|
323 |
+
try:
|
324 |
+
if index == 0:
|
325 |
+
display_morphosyntax_interface(
|
326 |
+
st.session_state.lang_code,
|
327 |
+
st.session_state.nlp_models,
|
328 |
+
t.get('TRANSLATIONS', {})
|
329 |
+
)
|
330 |
+
elif index == 1:
|
331 |
+
display_semantic_interface(
|
332 |
+
st.session_state.lang_code,
|
333 |
+
st.session_state.nlp_models,
|
334 |
+
t.get('TRANSLATIONS', {})
|
335 |
+
)
|
336 |
+
elif index == 2:
|
337 |
+
display_discourse_interface(
|
338 |
+
st.session_state.lang_code,
|
339 |
+
st.session_state.nlp_models,
|
340 |
+
t.get('TRANSLATIONS', {})
|
341 |
+
)
|
342 |
+
elif index == 3:
|
343 |
+
display_student_activities(
|
344 |
+
username=st.session_state.username,
|
345 |
+
lang_code=st.session_state.lang_code,
|
346 |
+
t=t.get('ACTIVITIES_TRANSLATIONS', {})
|
347 |
+
)
|
348 |
+
elif index == 4:
|
349 |
+
display_feedback_form(
|
350 |
+
st.session_state.lang_code,
|
351 |
+
t
|
352 |
+
)
|
353 |
+
except Exception as e:
|
354 |
+
logger.error(f"Error en tab {index}: {str(e)}")
|
355 |
+
st.error(t.get('tab_error', 'Error al cargar esta secci贸n'))
|
|
|
|
|
356 |
|
357 |
# Panel de depuraci贸n (solo visible en desarrollo)
|
358 |
if st.session_state.get('debug_mode', False):
|