Spaces:
Runtime error
Runtime error
Update processing.py
Browse files- processing.py +12 -12
processing.py
CHANGED
@@ -91,20 +91,20 @@ Analysis:"""
|
|
91 |
speaker_id = f"Speaker {i}"
|
92 |
parsed_analysis = output_parser.parse_speaker_analysis(speaker_analysis)
|
93 |
results[speaker_id] = {
|
94 |
-
'general_impression': parsed_analysis.
|
95 |
-
'attachments': parsed_analysis.
|
96 |
-
'bigfive': parsed_analysis.
|
97 |
-
'personalities': parsed_analysis.
|
98 |
}
|
99 |
|
100 |
if not results:
|
101 |
print("Warning: No speaker analyses found in the parsed JSON.")
|
102 |
empty_analysis = output_parser.parse_speaker_analysis({})
|
103 |
return {"Speaker 1": {
|
104 |
-
'general_impression': empty_analysis.
|
105 |
-
'attachments': empty_analysis.
|
106 |
-
'bigfive': empty_analysis.
|
107 |
-
'personalities': empty_analysis.
|
108 |
}}
|
109 |
|
110 |
return results
|
@@ -112,8 +112,8 @@ Analysis:"""
|
|
112 |
print(f"Error processing input: {e}")
|
113 |
empty_analysis = output_parser.parse_speaker_analysis({})
|
114 |
return {"Speaker 1": {
|
115 |
-
'general_impression': empty_analysis.
|
116 |
-
'attachments': empty_analysis.
|
117 |
-
'bigfive': empty_analysis.
|
118 |
-
'personalities': empty_analysis.
|
119 |
}}
|
|
|
91 |
speaker_id = f"Speaker {i}"
|
92 |
parsed_analysis = output_parser.parse_speaker_analysis(speaker_analysis)
|
93 |
results[speaker_id] = {
|
94 |
+
'general_impression': parsed_analysis.general_impression,
|
95 |
+
'attachments': parsed_analysis.attachment_style,
|
96 |
+
'bigfive': parsed_analysis.big_five_traits,
|
97 |
+
'personalities': parsed_analysis.personality_disorder
|
98 |
}
|
99 |
|
100 |
if not results:
|
101 |
print("Warning: No speaker analyses found in the parsed JSON.")
|
102 |
empty_analysis = output_parser.parse_speaker_analysis({})
|
103 |
return {"Speaker 1": {
|
104 |
+
'general_impression': empty_analysis.general_impression,
|
105 |
+
'attachments': empty_analysis.attachment_style,
|
106 |
+
'bigfive': empty_analysis.big_five_traits,
|
107 |
+
'personalities': empty_analysis.personality_disorder
|
108 |
}}
|
109 |
|
110 |
return results
|
|
|
112 |
print(f"Error processing input: {e}")
|
113 |
empty_analysis = output_parser.parse_speaker_analysis({})
|
114 |
return {"Speaker 1": {
|
115 |
+
'general_impression': empty_analysis.general_impression,
|
116 |
+
'attachments': empty_analysis.attachment_style,
|
117 |
+
'bigfive': empty_analysis.big_five_traits,
|
118 |
+
'personalities': empty_analysis.personality_disorder
|
119 |
}}
|