Spaces:
Sleeping
Sleeping
Update modules/studentact/current_situation_interface.py
Browse files
modules/studentact/current_situation_interface.py
CHANGED
|
@@ -87,11 +87,11 @@ def display_current_situation_interface(lang_code, nlp_models, current_situation
|
|
| 87 |
with input_col:
|
| 88 |
# Text area con manejo de estado
|
| 89 |
text_input = st.text_area(
|
| 90 |
-
current_situation_t.get
|
| 91 |
height=400,
|
| 92 |
key="text_area",
|
| 93 |
value=st.session_state.text_input,
|
| 94 |
-
help=current_situation_t.get('help', '
|
| 95 |
)
|
| 96 |
|
| 97 |
# Función para manejar cambios de texto
|
|
@@ -100,13 +100,13 @@ def display_current_situation_interface(lang_code, nlp_models, current_situation
|
|
| 100 |
st.session_state.show_results = False
|
| 101 |
|
| 102 |
if st.button(
|
| 103 |
-
current_situation_t.get
|
| 104 |
type="primary",
|
| 105 |
disabled=not text_input.strip(),
|
| 106 |
use_container_width=True,
|
| 107 |
):
|
| 108 |
try:
|
| 109 |
-
with st.spinner(current_situation_t.get
|
| 110 |
doc = nlp_models[lang_code](text_input)
|
| 111 |
metrics = analyze_text_dimensions(doc)
|
| 112 |
|
|
|
|
| 87 |
with input_col:
|
| 88 |
# Text area con manejo de estado
|
| 89 |
text_input = st.text_area(
|
| 90 |
+
current_situation_t.get('input_prompt', 'Escribe tu texto aquí'), # ✅ .get() con paréntesis
|
| 91 |
height=400,
|
| 92 |
key="text_area",
|
| 93 |
value=st.session_state.text_input,
|
| 94 |
+
help=current_situation_t.get('help', 'Ayuda sobre el campo de texto')
|
| 95 |
)
|
| 96 |
|
| 97 |
# Función para manejar cambios de texto
|
|
|
|
| 100 |
st.session_state.show_results = False
|
| 101 |
|
| 102 |
if st.button(
|
| 103 |
+
current_situation_t.get('analyze_button', 'Analizar texto'), # ✅
|
| 104 |
type="primary",
|
| 105 |
disabled=not text_input.strip(),
|
| 106 |
use_container_width=True,
|
| 107 |
):
|
| 108 |
try:
|
| 109 |
+
with st.spinner(current_situation_t.get('processing', 'Analizando...')): # ✅
|
| 110 |
doc = nlp_models[lang_code](text_input)
|
| 111 |
metrics = analyze_text_dimensions(doc)
|
| 112 |
|