Spaces:
Running
Running
Update modules/morphosyntax/morphosyntax_interface.py
Browse files
modules/morphosyntax/morphosyntax_interface.py
CHANGED
|
@@ -15,6 +15,7 @@ from ..database.morphosyntax_iterative_mongo_db import (
|
|
| 15 |
|
| 16 |
logger = logging.getLogger(__name__)
|
| 17 |
|
|
|
|
| 18 |
###########################################################################
|
| 19 |
def initialize_arc_analysis_state():
|
| 20 |
"""
|
|
@@ -125,8 +126,7 @@ def display_morphosyntax_interface(lang_code, nlp_models, morpho_t):
|
|
| 125 |
|
| 126 |
# Bot贸n para iniciar nuevo an谩lisis
|
| 127 |
if st.button("Nuevo An谩lisis", key="btn_reset_base"):
|
| 128 |
-
#
|
| 129 |
-
# descomenta la siguiente l铆nea:
|
| 130 |
# st.experimental_rerun()
|
| 131 |
reset_arc_analysis_state()
|
| 132 |
|
|
@@ -228,20 +228,17 @@ def display_morphosyntax_interface(lang_code, nlp_models, morpho_t):
|
|
| 228 |
st.error("Error procesando iteraci贸n")
|
| 229 |
logger.error(f"Error en iteraci贸n: {str(exc)}")
|
| 230 |
|
| 231 |
-
#
|
| 232 |
-
if arc_state["iteration_diagram"]:
|
| 233 |
-
st.markdown("<hr class='divider'>", unsafe_allow_html=True)
|
| 234 |
-
st.markdown("#### Diagrama de Arco (Iteraci贸n)")
|
| 235 |
-
st.write(arc_state["iteration_diagram"], unsafe_allow_html=True)
|
| 236 |
-
|
| 237 |
-
# Comparaci贸n vertical (uno abajo del otro)
|
| 238 |
if arc_state["base_diagram"] and arc_state["iteration_diagram"]:
|
| 239 |
st.markdown("<hr class='divider'>", unsafe_allow_html=True)
|
| 240 |
st.markdown("### Comparaci贸n Vertical: Base vs. Iteraci贸n")
|
| 241 |
-
|
|
|
|
| 242 |
st.markdown("**Diagrama Base**")
|
| 243 |
st.write(arc_state["base_diagram"], unsafe_allow_html=True)
|
| 244 |
-
|
| 245 |
st.markdown("---")
|
|
|
|
|
|
|
| 246 |
st.markdown("**Diagrama Iterado**")
|
| 247 |
st.write(arc_state["iteration_diagram"], unsafe_allow_html=True)
|
|
|
|
| 15 |
|
| 16 |
logger = logging.getLogger(__name__)
|
| 17 |
|
| 18 |
+
|
| 19 |
###########################################################################
|
| 20 |
def initialize_arc_analysis_state():
|
| 21 |
"""
|
|
|
|
| 126 |
|
| 127 |
# Bot贸n para iniciar nuevo an谩lisis
|
| 128 |
if st.button("Nuevo An谩lisis", key="btn_reset_base"):
|
| 129 |
+
# Si requieres recargar la app por completo:
|
|
|
|
| 130 |
# st.experimental_rerun()
|
| 131 |
reset_arc_analysis_state()
|
| 132 |
|
|
|
|
| 228 |
st.error("Error procesando iteraci贸n")
|
| 229 |
logger.error(f"Error en iteraci贸n: {str(exc)}")
|
| 230 |
|
| 231 |
+
# Comparaci贸n vertical si tenemos ambos diagramas
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 232 |
if arc_state["base_diagram"] and arc_state["iteration_diagram"]:
|
| 233 |
st.markdown("<hr class='divider'>", unsafe_allow_html=True)
|
| 234 |
st.markdown("### Comparaci贸n Vertical: Base vs. Iteraci贸n")
|
| 235 |
+
|
| 236 |
+
# Diagrama base
|
| 237 |
st.markdown("**Diagrama Base**")
|
| 238 |
st.write(arc_state["base_diagram"], unsafe_allow_html=True)
|
| 239 |
+
|
| 240 |
st.markdown("---")
|
| 241 |
+
|
| 242 |
+
# Diagrama iterado
|
| 243 |
st.markdown("**Diagrama Iterado**")
|
| 244 |
st.write(arc_state["iteration_diagram"], unsafe_allow_html=True)
|