Update modules/studentact/current_situation_interface.py
Browse files
modules/studentact/current_situation_interface.py
CHANGED
@@ -102,36 +102,29 @@ def display_current_situation_interface(lang_code, nlp_models, t):
|
|
102 |
with st.container():
|
103 |
input_col, results_col = st.columns([1,2])
|
104 |
|
105 |
-
|
106 |
-
st.markdown("""
|
107 |
-
<style>
|
108 |
-
.stTextArea textarea {
|
109 |
-
min-height: 800px !important;
|
110 |
-
}
|
111 |
-
</style>
|
112 |
-
""", unsafe_allow_html=True)
|
113 |
-
|
114 |
with input_col:
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
135 |
try:
|
136 |
with st.spinner(t.get('processing', "Analizando...")): # Usando t.get directamente
|
137 |
doc = nlp_models[lang_code](text_input)
|
|
|
102 |
with st.container():
|
103 |
input_col, results_col = st.columns([1,2])
|
104 |
|
105 |
+
###############################################################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
with input_col:
|
107 |
+
with st.form(key=f"text_input_form_{lang_code}"):
|
108 |
+
text_input = st.text_area(
|
109 |
+
t.get('input_prompt', "Escribe o pega tu texto aqu铆:"),
|
110 |
+
height=800,
|
111 |
+
key=f"text_area_{lang_code}",
|
112 |
+
value=st.session_state.text_input,
|
113 |
+
help=t.get('help', "Este texto ser谩 analizado para darte recomendaciones personalizadas")
|
114 |
+
)
|
115 |
+
|
116 |
+
submit_button = st.form_submit_button(
|
117 |
+
t.get('analyze_button', "Analizar mi escritura"),
|
118 |
+
type="primary",
|
119 |
+
use_container_width=True
|
120 |
+
)
|
121 |
+
|
122 |
+
if submit_button:
|
123 |
+
if text_input.strip():
|
124 |
+
st.session_state.text_input = text_input
|
125 |
+
|
126 |
+
#######################################################################
|
127 |
+
# C贸digo para an谩lisis...
|
128 |
try:
|
129 |
with st.spinner(t.get('processing', "Analizando...")): # Usando t.get directamente
|
130 |
doc = nlp_models[lang_code](text_input)
|