Spaces:
Sleeping
Sleeping
Update modules/studentact/current_situation_interface.py
Browse files
modules/studentact/current_situation_interface.py
CHANGED
|
@@ -325,6 +325,7 @@ def display_radar_chart(metrics_config, thresholds):
|
|
| 325 |
st.error("Error al mostrar el gráfico")
|
| 326 |
|
| 327 |
#####################################################
|
|
|
|
| 328 |
def display_recommendations_with_actions(recommendations, lang_code, t):
|
| 329 |
"""
|
| 330 |
Muestra las recomendaciones con un diseño de tarjetas y opciones para acciones específicas.
|
|
@@ -377,35 +378,20 @@ def display_recommendations_with_actions(recommendations, lang_code, t):
|
|
| 377 |
if isinstance(priority_content, list):
|
| 378 |
priority_content = "<br>".join([f"• {tip}" for tip in priority_content])
|
| 379 |
|
| 380 |
-
#
|
| 381 |
with st.container():
|
| 382 |
st.markdown(
|
| 383 |
f"""
|
| 384 |
<div style="border:2px solid {colors['priority']}; border-radius:5px; padding:15px; margin-bottom:20px;">
|
| 385 |
<h4 style="color:{colors['priority']};">{priority_title}</h4>
|
| 386 |
<p>{priority_content}</p>
|
| 387 |
-
<p><strong>
|
| 388 |
-
<p>{dimension_to_tool.get(priority_area, {}).get('description', '')}</p>
|
| 389 |
</div>
|
| 390 |
""",
|
| 391 |
unsafe_allow_html=True
|
| 392 |
)
|
| 393 |
|
| 394 |
-
#
|
| 395 |
-
recommendation_tool = dimension_to_tool.get(priority_area, {}).get('tool')
|
| 396 |
-
if recommendation_tool:
|
| 397 |
-
if st.button(f"Ir a {recommendation_tool}", key=f"goto_{priority_area}", type="primary"):
|
| 398 |
-
# Lógica para cambiar a la herramienta recomendada
|
| 399 |
-
if recommendation_tool == "Análisis Morfosintáctico":
|
| 400 |
-
st.session_state.page = 'morpho'
|
| 401 |
-
st.session_state.selected_tab = 0
|
| 402 |
-
elif recommendation_tool == "Análisis Semántico":
|
| 403 |
-
st.session_state.page = 'semantic'
|
| 404 |
-
st.session_state.selected_tab = 1
|
| 405 |
-
elif recommendation_tool == "Análisis del Discurso":
|
| 406 |
-
st.session_state.page = 'discourse'
|
| 407 |
-
st.session_state.selected_tab = 2
|
| 408 |
-
st.rerun()
|
| 409 |
|
| 410 |
# Crear dos columnas para las tarjetas de recomendaciones restantes
|
| 411 |
col1, col2 = st.columns(2)
|
|
@@ -426,32 +412,18 @@ def display_recommendations_with_actions(recommendations, lang_code, t):
|
|
| 426 |
|
| 427 |
# Alternar entre columnas
|
| 428 |
with col1 if i % 2 == 0 else col2:
|
| 429 |
-
#
|
| 430 |
st.markdown(
|
| 431 |
f"""
|
| 432 |
<div style="border:1px solid {colors[category]}; border-radius:5px; padding:10px; margin-bottom:15px;">
|
| 433 |
<h4 style="color:{colors[category]};">{icons[category]} {category_title}</h4>
|
| 434 |
<p>{category_content}</p>
|
| 435 |
-
<p><strong>Herramienta:</strong> {dimension_to_tool.get(category, {}).get('tool', '')}</p>
|
| 436 |
</div>
|
| 437 |
""",
|
| 438 |
unsafe_allow_html=True
|
| 439 |
)
|
| 440 |
|
| 441 |
-
#
|
| 442 |
-
tool = dimension_to_tool.get(category, {}).get('tool')
|
| 443 |
-
if tool:
|
| 444 |
-
if st.button(f"Ir a {tool}", key=f"goto_{category}", type="secondary", use_container_width=True):
|
| 445 |
-
if tool == "Análisis Morfosintáctico":
|
| 446 |
-
st.session_state.page = 'morpho'
|
| 447 |
-
st.session_state.selected_tab = 0
|
| 448 |
-
elif tool == "Análisis Semántico":
|
| 449 |
-
st.session_state.page = 'semantic'
|
| 450 |
-
st.session_state.selected_tab = 1
|
| 451 |
-
elif tool == "Análisis del Discurso":
|
| 452 |
-
st.session_state.page = 'discourse'
|
| 453 |
-
st.session_state.selected_tab = 2
|
| 454 |
-
st.rerun()
|
| 455 |
|
| 456 |
# Agregar una sección para recursos adicionales
|
| 457 |
st.markdown("---")
|
|
@@ -488,4 +460,4 @@ def display_recommendations_with_actions(recommendations, lang_code, t):
|
|
| 488 |
- **Próximamente**: Tutorial interactivo para mejorar la escritura
|
| 489 |
|
| 490 |
> Estamos trabajando continuamente para mejorar tus herramientas de escritura.
|
| 491 |
-
""")
|
|
|
|
| 325 |
st.error("Error al mostrar el gráfico")
|
| 326 |
|
| 327 |
#####################################################
|
| 328 |
+
|
| 329 |
def display_recommendations_with_actions(recommendations, lang_code, t):
|
| 330 |
"""
|
| 331 |
Muestra las recomendaciones con un diseño de tarjetas y opciones para acciones específicas.
|
|
|
|
| 378 |
if isinstance(priority_content, list):
|
| 379 |
priority_content = "<br>".join([f"• {tip}" for tip in priority_content])
|
| 380 |
|
| 381 |
+
# MODIFICACIÓN: Texto modificado para la recomendación prioritaria
|
| 382 |
with st.container():
|
| 383 |
st.markdown(
|
| 384 |
f"""
|
| 385 |
<div style="border:2px solid {colors['priority']}; border-radius:5px; padding:15px; margin-bottom:20px;">
|
| 386 |
<h4 style="color:{colors['priority']};">{priority_title}</h4>
|
| 387 |
<p>{priority_content}</p>
|
| 388 |
+
<p><strong>Recomendación:</strong> Despliega el asistente virtual (potenciado por Claude.AI) que se ubica en la parte superior izquierda, presiona la flecha del lado del logo.</p>
|
|
|
|
| 389 |
</div>
|
| 390 |
""",
|
| 391 |
unsafe_allow_html=True
|
| 392 |
)
|
| 393 |
|
| 394 |
+
# MODIFICACIÓN: Eliminado el botón para ir a la herramienta recomendada
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 395 |
|
| 396 |
# Crear dos columnas para las tarjetas de recomendaciones restantes
|
| 397 |
col1, col2 = st.columns(2)
|
|
|
|
| 412 |
|
| 413 |
# Alternar entre columnas
|
| 414 |
with col1 if i % 2 == 0 else col2:
|
| 415 |
+
# MODIFICACIÓN: Tarjeta solo con el nombre de la funcionalidad, sin botón
|
| 416 |
st.markdown(
|
| 417 |
f"""
|
| 418 |
<div style="border:1px solid {colors[category]}; border-radius:5px; padding:10px; margin-bottom:15px;">
|
| 419 |
<h4 style="color:{colors[category]};">{icons[category]} {category_title}</h4>
|
| 420 |
<p>{category_content}</p>
|
|
|
|
| 421 |
</div>
|
| 422 |
""",
|
| 423 |
unsafe_allow_html=True
|
| 424 |
)
|
| 425 |
|
| 426 |
+
# MODIFICACIÓN: Eliminado el botón para ir a la herramienta específica
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 427 |
|
| 428 |
# Agregar una sección para recursos adicionales
|
| 429 |
st.markdown("---")
|
|
|
|
| 460 |
- **Próximamente**: Tutorial interactivo para mejorar la escritura
|
| 461 |
|
| 462 |
> Estamos trabajando continuamente para mejorar tus herramientas de escritura.
|
| 463 |
+
""")
|