Update modules/morphosyntax/morphosyntax_interface.py
Browse files
modules/morphosyntax/morphosyntax_interface.py
CHANGED
@@ -103,6 +103,15 @@ def display_morphosyntax_interface(lang_code, nlp_models, t):
|
|
103 |
st.error(morpho_t.get('error_processing', f'Error processing text: {str(e)}'))
|
104 |
else:
|
105 |
st.warning(morpho_t.get('warning_message', 'Please enter a text to analyze'))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
|
107 |
############################################################################################################
|
108 |
def display_morphosyntax_results(result, lang_code, t):
|
|
|
103 |
st.error(morpho_t.get('error_processing', f'Error processing text: {str(e)}'))
|
104 |
else:
|
105 |
st.warning(morpho_t.get('warning_message', 'Please enter a text to analyze'))
|
106 |
+
# Mostrar resultados previos si existen
|
107 |
+
elif 'morphosyntax_result' in st.session_state and st.session_state.morphosyntax_result is not None:
|
108 |
+
display_morphosyntax_results(
|
109 |
+
st.session_state.morphosyntax_result,
|
110 |
+
lang_code,
|
111 |
+
morpho_t
|
112 |
+
)
|
113 |
+
else:
|
114 |
+
st.info(morpho_t.get('morpho_initial_message', 'Enter text to begin analysis'))
|
115 |
|
116 |
############################################################################################################
|
117 |
def display_morphosyntax_results(result, lang_code, t):
|