Spaces:
Runtime error
Runtime error
Update output_parser.py
Browse files- output_parser.py +16 -16
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,9 +71,9 @@ 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("
|
77 |
self_model=attachment_styles.get("Self", 0),
|
78 |
others_model=attachment_styles.get("Others", 0),
|
79 |
anxiety=attachment_styles.get("Anxiety", 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="AnxiousPreoccupied")
|
8 |
+
dismissive_avoidant: float = Field(0.0, alias="DismissiveAvoidant")
|
9 |
+
fearful_avoidant: float = Field(0.0, alias="FearfulAvoidant")
|
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="SchizoidSchizotypal")
|
28 |
+
antisocial_psychopathic: int = Field(0, alias="AntisocialPsychopathic")
|
29 |
+
borderline_dysregulated: int = Field(0, alias="BorderlineDysregulated")
|
30 |
narcissistic: int = 0
|
31 |
+
anxious_avoidant: int = Field(0, alias="AnxiousAvoidant")
|
32 |
+
dependent_victimized: int = Field(0, alias="DependentVictimized")
|
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("AnxiousPreoccupied", 0.0),
|
75 |
+
dismissive_avoidant=attachment_styles.get("DismissiveAvoidant", 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),
|
79 |
anxiety=attachment_styles.get("Anxiety", 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("SchizoidSchizotypal", 0),
|
95 |
+
antisocial_psychopathic=personality_disorders.get("AntisocialPsychopathic", 0),
|
96 |
+
borderline_dysregulated=personality_disorders.get("BorderlineDysregulated", 0),
|
97 |
narcissistic=personality_disorders.get("Narcissistic", 0),
|
98 |
+
anxious_avoidant=personality_disorders.get("AnxiousAvoidant", 0),
|
99 |
+
dependent_victimized=personality_disorders.get("DependentVictimized", 0),
|
100 |
obsessional=personality_disorders.get("Obsessional", 0),
|
101 |
explanation=personality_disorders.get("Explanation", "No explanation provided")
|
102 |
)
|