Spaces:
Runtime error
Runtime error
Update visualization.py
Browse files- visualization.py +5 -1
visualization.py
CHANGED
@@ -4,10 +4,14 @@ from plotly.subplots import make_subplots
|
|
4 |
def create_charts(results):
|
5 |
charts = {}
|
6 |
explanations = {}
|
|
|
7 |
|
8 |
for speaker_id, data in results.items():
|
9 |
charts[speaker_id] = {}
|
10 |
explanations[speaker_id] = {}
|
|
|
|
|
|
|
11 |
|
12 |
# Attachment Styles
|
13 |
attachment_data = data['attachments']
|
@@ -71,4 +75,4 @@ def create_charts(results):
|
|
71 |
)
|
72 |
charts[speaker_id]['dimensions'] = fig
|
73 |
|
74 |
-
return charts, explanations
|
|
|
4 |
def create_charts(results):
|
5 |
charts = {}
|
6 |
explanations = {}
|
7 |
+
general_impressions = {}
|
8 |
|
9 |
for speaker_id, data in results.items():
|
10 |
charts[speaker_id] = {}
|
11 |
explanations[speaker_id] = {}
|
12 |
+
|
13 |
+
# Extract general impression
|
14 |
+
general_impressions[speaker_id] = data.get('general_impression', "No general impression provided.")
|
15 |
|
16 |
# Attachment Styles
|
17 |
attachment_data = data['attachments']
|
|
|
75 |
)
|
76 |
charts[speaker_id]['dimensions'] = fig
|
77 |
|
78 |
+
return charts, explanations, general_impressions
|