Update modules/studentact/current_situation_interface.py
Browse files
modules/studentact/current_situation_interface.py
CHANGED
@@ -276,28 +276,28 @@ def display_diagnosis(metrics, text_type=None, lang_code='es', t=None):
|
|
276 |
with metrics_col:
|
277 |
metrics_config = [
|
278 |
{
|
279 |
-
'label':
|
280 |
'key': 'vocabulary',
|
281 |
'value': metrics['vocabulary']['normalized_score'],
|
282 |
'help': t.get('vocabulary_help', "Riqueza y variedad del vocabulario"),
|
283 |
'thresholds': thresholds['vocabulary']
|
284 |
},
|
285 |
{
|
286 |
-
'label':
|
287 |
'key': 'structure',
|
288 |
'value': metrics['structure']['normalized_score'],
|
289 |
'help': t.get('structure_help', "Organización y complejidad de oraciones"),
|
290 |
'thresholds': thresholds['structure']
|
291 |
},
|
292 |
{
|
293 |
-
'label':
|
294 |
'key': 'cohesion',
|
295 |
'value': metrics['cohesion']['normalized_score'],
|
296 |
'help': t.get('cohesion_help', "Conexión y fluidez entre ideas"),
|
297 |
'thresholds': thresholds['cohesion']
|
298 |
},
|
299 |
{
|
300 |
-
'label':
|
301 |
'key': 'clarity',
|
302 |
'value': metrics['clarity']['normalized_score'],
|
303 |
'help': t.get('clarity_help', "Facilidad de comprensión del texto"),
|
@@ -309,16 +309,16 @@ def display_diagnosis(metrics, text_type=None, lang_code='es', t=None):
|
|
309 |
for metric in metrics_config:
|
310 |
value = metric['value']
|
311 |
if value < metric['thresholds']['min']:
|
312 |
-
status =
|
313 |
color = "inverse"
|
314 |
elif value < metric['thresholds']['target']:
|
315 |
-
status =
|
316 |
color = "off"
|
317 |
else:
|
318 |
-
status =
|
319 |
color = "normal"
|
320 |
|
321 |
-
target_text =
|
322 |
|
323 |
st.metric(
|
324 |
metric['label'],
|
|
|
276 |
with metrics_col:
|
277 |
metrics_config = [
|
278 |
{
|
279 |
+
'label': labels['vocabulary'],
|
280 |
'key': 'vocabulary',
|
281 |
'value': metrics['vocabulary']['normalized_score'],
|
282 |
'help': t.get('vocabulary_help', "Riqueza y variedad del vocabulario"),
|
283 |
'thresholds': thresholds['vocabulary']
|
284 |
},
|
285 |
{
|
286 |
+
'label': labels['structure'],
|
287 |
'key': 'structure',
|
288 |
'value': metrics['structure']['normalized_score'],
|
289 |
'help': t.get('structure_help', "Organización y complejidad de oraciones"),
|
290 |
'thresholds': thresholds['structure']
|
291 |
},
|
292 |
{
|
293 |
+
'label': labels['cohesion'],
|
294 |
'key': 'cohesion',
|
295 |
'value': metrics['cohesion']['normalized_score'],
|
296 |
'help': t.get('cohesion_help', "Conexión y fluidez entre ideas"),
|
297 |
'thresholds': thresholds['cohesion']
|
298 |
},
|
299 |
{
|
300 |
+
'label': labels['clarity'],
|
301 |
'key': 'clarity',
|
302 |
'value': metrics['clarity']['normalized_score'],
|
303 |
'help': t.get('clarity_help', "Facilidad de comprensión del texto"),
|
|
|
309 |
for metric in metrics_config:
|
310 |
value = metric['value']
|
311 |
if value < metric['thresholds']['min']:
|
312 |
+
status = labels['improvement']
|
313 |
color = "inverse"
|
314 |
elif value < metric['thresholds']['target']:
|
315 |
+
status = labels['acceptable']
|
316 |
color = "off"
|
317 |
else:
|
318 |
+
status = labels['optimal']
|
319 |
color = "normal"
|
320 |
|
321 |
+
target_text = labels['target'].format(metric['thresholds']['target'])
|
322 |
|
323 |
st.metric(
|
324 |
metric['label'],
|