Spaces:
Runtime error
Runtime error
Update output_parser.py
Browse files- output_parser.py +5 -5
output_parser.py
CHANGED
|
@@ -3,7 +3,7 @@ from pydantic import BaseModel, Field
|
|
| 3 |
import json
|
| 4 |
|
| 5 |
class AttachmentStyle(BaseModel):
|
| 6 |
-
|
| 7 |
Secured: float = Field(0.0, alias="Secured")
|
| 8 |
Anxious_Preoccupied: float = Field(0.0, alias="Anxious-Preoccupied")
|
| 9 |
Dismissive_Avoidant: float = Field(0.0, alias="Dismissive-Avoidant")
|
|
@@ -15,7 +15,7 @@ class AttachmentStyle(BaseModel):
|
|
| 15 |
Explanation: str = "No explanation provided"
|
| 16 |
|
| 17 |
class BigFiveTraits(BaseModel):
|
| 18 |
-
|
| 19 |
Extraversion: int = 0
|
| 20 |
Agreeableness: int = 0
|
| 21 |
Conscientiousness: int = 0
|
|
@@ -24,7 +24,7 @@ class BigFiveTraits(BaseModel):
|
|
| 24 |
Explanation: str = "No explanation provided"
|
| 25 |
|
| 26 |
class PersonalityDisorder(BaseModel):
|
| 27 |
-
|
| 28 |
Depressed: int = 0
|
| 29 |
Paranoid: int = 0
|
| 30 |
Schizoid_Schizotypal: int = Field(0, alias="Schizoid-Schizotypal")
|
|
@@ -60,7 +60,7 @@ class AttachmentStyleOutputParser:
|
|
| 60 |
{
|
| 61 |
"speaker_analyses": [
|
| 62 |
{
|
| 63 |
-
"
|
| 64 |
"attachment_styles": {
|
| 65 |
"Secured": 0.5,
|
| 66 |
"Anxious-Preoccupied": 0.2,
|
|
@@ -94,7 +94,7 @@ class AttachmentStyleOutputParser:
|
|
| 94 |
}
|
| 95 |
},
|
| 96 |
{
|
| 97 |
-
"
|
| 98 |
...
|
| 99 |
}
|
| 100 |
]
|
|
|
|
| 3 |
import json
|
| 4 |
|
| 5 |
class AttachmentStyle(BaseModel):
|
| 6 |
+
Speaker: str = "Unknown Speaker"
|
| 7 |
Secured: float = Field(0.0, alias="Secured")
|
| 8 |
Anxious_Preoccupied: float = Field(0.0, alias="Anxious-Preoccupied")
|
| 9 |
Dismissive_Avoidant: float = Field(0.0, alias="Dismissive-Avoidant")
|
|
|
|
| 15 |
Explanation: str = "No explanation provided"
|
| 16 |
|
| 17 |
class BigFiveTraits(BaseModel):
|
| 18 |
+
Speaker: str = "Unknown Speaker"
|
| 19 |
Extraversion: int = 0
|
| 20 |
Agreeableness: int = 0
|
| 21 |
Conscientiousness: int = 0
|
|
|
|
| 24 |
Explanation: str = "No explanation provided"
|
| 25 |
|
| 26 |
class PersonalityDisorder(BaseModel):
|
| 27 |
+
Speaker: str = "Unknown Speaker"
|
| 28 |
Depressed: int = 0
|
| 29 |
Paranoid: int = 0
|
| 30 |
Schizoid_Schizotypal: int = Field(0, alias="Schizoid-Schizotypal")
|
|
|
|
| 60 |
{
|
| 61 |
"speaker_analyses": [
|
| 62 |
{
|
| 63 |
+
"Speaker": "1",
|
| 64 |
"attachment_styles": {
|
| 65 |
"Secured": 0.5,
|
| 66 |
"Anxious-Preoccupied": 0.2,
|
|
|
|
| 94 |
}
|
| 95 |
},
|
| 96 |
{
|
| 97 |
+
"Speaker": "2",
|
| 98 |
...
|
| 99 |
}
|
| 100 |
]
|