Cognitive Distortion model

class apps.expert.core.distortion.dist_model.DistortionModel(lang: str | None = 'en', device: device | None = None)[source]

Bases: object

Congitive distortions classification across the text channel.

property device: device

Check the device type.

Returns:

Device type on local machine.

Return type:

torch.device

predict(text: str) List[Dict][source]

Predicting distortions from the text in English or Russian.

Parameters:

text (str) – The text to classify.