diff --git a/app/api/dexi.py b/app/api/dexi.py index 892f201f32181d32fe2eaccbe00faabe4db997e0..840229855b5bbf4bbd83aaf35fce35f395f773a5 100644 --- a/app/api/dexi.py +++ b/app/api/dexi.py @@ -184,6 +184,8 @@ def create_recommendation_text(kpi, amount_changed, caused_by, step_size): return "" if 'co2' in caused_by.replace(' ', '').lower() and 'co2' in kpi.replace(' ', '').lower(): return "" + if amount_changed < 0: + amount_changed *= -1 return f'In order to change the KPI of {kpi} by {int(amount_changed)*10}%, {caused_by} should be improved by {step_size*10}%.\n'