peal.teachers.human2model_teacher¶
Interactive Flask teacher that asks a human to label counterfactual collages.
PEAL teachers turn counterfactual explanations into feedback for the adaptor.
Human2ModelTeacher serves each collage in a small web page (templates
feedback_loop.html / information.html) and blocks in
Human2ModelTeacher.get_feedback() until the person has answered
“True Counterfactual”, “False Counterfactual” or “Out of Distribution” for
every image. Collages are copied into a local static folder for serving.
Classes
Mutable state shared between the Flask route and the training thread. |
|
Teacher whose feedback comes from a human through a local web form. |