From 2fb19791e4705835d3455ebc16f856c0ead65ba0 Mon Sep 17 00:00:00 2001 From: Daphne Odekerken Date: Mon, 22 Apr 2024 11:41:06 +0200 Subject: [PATCH] Restructuring evaluation tab for visualisation of ASPIC+ ATs. --- .../pages/22_visualise_aspic.py | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/py_arg_visualisation/pages/22_visualise_aspic.py b/src/py_arg_visualisation/pages/22_visualise_aspic.py index 2501925..4fd9ab0 100644 --- a/src/py_arg_visualisation/pages/22_visualise_aspic.py +++ b/src/py_arg_visualisation/pages/22_visualise_aspic.py @@ -205,10 +205,9 @@ def get_structured_evaluation_specification_div(): {'label': 'Stable', 'value': 'Stable'}, {'label': 'Semi-stable', 'value': 'SemiStable'}, {'label': 'Eager', 'value': 'Eager'}, - ], - value='Complete', id='structured-evaluation-semantics')), + ], value='Complete', id='structured-evaluation-semantics')), ]), - + dbc.Row(id='22-aspic-evaluation-semantics'), dbc.Row([ dbc.Col(html.B('Evaluation strategy')), dbc.Col(dbc.Select( @@ -220,7 +219,7 @@ def get_structured_evaluation_specification_div(): ], value='Credulous', id='structured-evaluation-strategy')), ]), - dbc.Row(id='structured-evaluation') + dbc.Row(id='22-aspic-evaluation-accepted') ]), ]) @@ -426,7 +425,8 @@ def create_argumentation_theory( @callback( - Output('structured-evaluation', 'children'), + Output('22-aspic-evaluation-semantics', 'children'), + Output('22-aspic-evaluation-accepted', 'children'), State('aspic-axioms', 'value'), State('aspic-ordinary-premises', 'value'), State('aspic-strict-rules', 'value'), @@ -514,10 +514,25 @@ def evaluate_structured_argumentation_framework( 'index': '+'.join(formula_arguments[formula.s1])}) for formula in sorted(accepted_formulas)] - return [html.B('The extension(s):'), - html.Div(extension_buttons), - html.B('The accepted formula(s):'), - html.Div(accepted_formula_buttons)] + semantics_div = html.Div([ + html.B('The extension(s):'), + html.Br(), + html.I('Click on the extension buttons to ' + 'display the corresponding extension ' + 'in the graph.'), + html.Div(extension_buttons), + html.Br() + ]) + accepted_div = html.Div([ + html.B('The accepted formula(s):'), + html.Br(), + html.I('Click on the accepted formula buttons to ' + 'display the corresponding argument ' + 'in the graph.'), + html.Div(accepted_formula_buttons), + ]) + + return semantics_div, accepted_div @callback(