Spaces:
Runtime error
Runtime error
Update output_parser.py
Browse files- output_parser.py +15 -15
output_parser.py
CHANGED
@@ -4,9 +4,9 @@ import json
|
|
4 |
|
5 |
class AttachmentStyle(BaseModel):
|
6 |
secured: float = 0.0
|
7 |
-
anxious_preoccupied: float = Field(0.0, alias="
|
8 |
-
dismissive_avoidant: float = Field(0.0, alias="
|
9 |
-
fearful_avoidant: float = Field(0.0, alias="
|
10 |
self_model: int = Field(0, alias="Self")
|
11 |
others_model: int = Field(0, alias="Others")
|
12 |
anxiety: int = 0
|
@@ -24,12 +24,12 @@ class BigFiveTraits(BaseModel):
|
|
24 |
class PersonalityDisorder(BaseModel):
|
25 |
depressed: int = 0
|
26 |
paranoid: int = 0
|
27 |
-
schizoid_schizotypal: int = Field(0, alias="
|
28 |
-
antisocial_psychopathic: int = Field(0, alias="
|
29 |
-
borderline_dysregulated: int = Field(0, alias="
|
30 |
narcissistic: int = 0
|
31 |
-
anxious_avoidant: int = Field(0, alias="
|
32 |
-
dependent_victimized: int = Field(0, alias="
|
33 |
obsessional: int = 0
|
34 |
explanation: str = "No explanation provided"
|
35 |
|
@@ -71,8 +71,8 @@ class OutputParser:
|
|
71 |
general_impression=general_impression_str,
|
72 |
attachment_style=AttachmentStyle(
|
73 |
secured=attachment_styles.get("Secured", 0.0),
|
74 |
-
anxious_preoccupied=attachment_styles.get("
|
75 |
-
dismissive_avoidant=attachment_styles.get("
|
76 |
fearful_avoidant=attachment_styles.get("FearfulAvoidant", 0.0),
|
77 |
self_model=attachment_styles.get("Self", 0),
|
78 |
others_model=attachment_styles.get("Others", 0),
|
@@ -91,12 +91,12 @@ class OutputParser:
|
|
91 |
personality_disorder=PersonalityDisorder(
|
92 |
depressed=personality_disorders.get("Depressed", 0),
|
93 |
paranoid=personality_disorders.get("Paranoid", 0),
|
94 |
-
schizoid_schizotypal=personality_disorders.get("
|
95 |
-
antisocial_psychopathic=personality_disorders.get("
|
96 |
-
borderline_dysregulated=personality_disorders.get("
|
97 |
narcissistic=personality_disorders.get("Narcissistic", 0),
|
98 |
-
anxious_avoidant=personality_disorders.get("
|
99 |
-
dependent_victimized=personality_disorders.get("
|
100 |
obsessional=personality_disorders.get("Obsessional", 0),
|
101 |
explanation=personality_disorders.get("Explanation", "No explanation provided")
|
102 |
)
|
|
|
4 |
|
5 |
class AttachmentStyle(BaseModel):
|
6 |
secured: float = 0.0
|
7 |
+
anxious_preoccupied: float = Field(0.0, alias="Anxious-Preoccupied")
|
8 |
+
dismissive_avoidant: float = Field(0.0, alias="Dismissive-Avoidant")
|
9 |
+
fearful_avoidant: float = Field(0.0, alias="Fearful-Avoidant")
|
10 |
self_model: int = Field(0, alias="Self")
|
11 |
others_model: int = Field(0, alias="Others")
|
12 |
anxiety: int = 0
|
|
|
24 |
class PersonalityDisorder(BaseModel):
|
25 |
depressed: int = 0
|
26 |
paranoid: int = 0
|
27 |
+
schizoid_schizotypal: int = Field(0, alias="Schizoid-Schizotypal")
|
28 |
+
antisocial_psychopathic: int = Field(0, alias="Antisocial-Psychopathic")
|
29 |
+
borderline_dysregulated: int = Field(0, alias="Borderline-Dysregulated")
|
30 |
narcissistic: int = 0
|
31 |
+
anxious_avoidant: int = Field(0, alias="Anxious-Avoidant")
|
32 |
+
dependent_victimized: int = Field(0, alias="Dependent-Victimized")
|
33 |
obsessional: int = 0
|
34 |
explanation: str = "No explanation provided"
|
35 |
|
|
|
71 |
general_impression=general_impression_str,
|
72 |
attachment_style=AttachmentStyle(
|
73 |
secured=attachment_styles.get("Secured", 0.0),
|
74 |
+
anxious_preoccupied=attachment_styles.get("Anxious-Preoccupied", 0.0),
|
75 |
+
dismissive_avoidant=attachment_styles.get("Dismissive-Avoidant", 0.0),
|
76 |
fearful_avoidant=attachment_styles.get("FearfulAvoidant", 0.0),
|
77 |
self_model=attachment_styles.get("Self", 0),
|
78 |
others_model=attachment_styles.get("Others", 0),
|
|
|
91 |
personality_disorder=PersonalityDisorder(
|
92 |
depressed=personality_disorders.get("Depressed", 0),
|
93 |
paranoid=personality_disorders.get("Paranoid", 0),
|
94 |
+
schizoid_schizotypal=personality_disorders.get("Schizoid-Schizotypal", 0),
|
95 |
+
antisocial_psychopathic=personality_disorders.get("Antisocial-Psychopathic", 0),
|
96 |
+
borderline_dysregulated=personality_disorders.get("Borderline-Dysregulated", 0),
|
97 |
narcissistic=personality_disorders.get("Narcissistic", 0),
|
98 |
+
anxious_avoidant=personality_disorders.get("Anxious-Avoidant", 0),
|
99 |
+
dependent_victimized=personality_disorders.get("Dependent-Victimized", 0),
|
100 |
obsessional=personality_disorders.get("Obsessional", 0),
|
101 |
explanation=personality_disorders.get("Explanation", "No explanation provided")
|
102 |
)
|