Spaces:
Runtime error
Runtime error
Update visualization.py
Browse files- visualization.py +0 -15
visualization.py
CHANGED
@@ -37,21 +37,6 @@ def create_charts(results):
|
|
37 |
charts[speaker_id]['bigfive'] = fig
|
38 |
explanations[speaker_id]['bigfive'] = bigfive_data.explanation
|
39 |
|
40 |
-
# Personality Disorders
|
41 |
-
personality_data = data['personalities']
|
42 |
-
labels = ['Depressed', 'Paranoid', 'Schizoid-Schizotypal', 'Antisocial-Psychopathic',
|
43 |
-
'Borderline-Dysregulated', 'Narcissistic', 'Anxious-Avoidant', 'Dependent-Victimized', 'Obsessional']
|
44 |
-
values = [personality_data.depressed, personality_data.paranoid,
|
45 |
-
personality_data.schizoid_schizotypal, personality_data.antisocial_psychopathic,
|
46 |
-
personality_data.borderline_dysregulated, personality_data.narcissistic,
|
47 |
-
personality_data.anxious_avoidant, personality_data.dependent_victimized,
|
48 |
-
personality_data.obsessional]
|
49 |
-
colors = ['gray', 'purple', 'gold', 'black', 'red', 'orange', 'green', 'cyan', 'brown']
|
50 |
-
|
51 |
-
fig = go.Figure(data=[go.Bar(x=labels, y=values, marker_color=colors)])
|
52 |
-
fig.update_layout(title=f'{speaker_id}: Personality Disorders', yaxis_range=[0, 5])
|
53 |
-
charts[speaker_id]['personality'] = fig
|
54 |
-
explanations[speaker_id]['personality'] = personality_data.explanation
|
55 |
|
56 |
# Attachment Dimensions (Radar Chart)
|
57 |
dimensions_data = data['attachments']
|
|
|
37 |
charts[speaker_id]['bigfive'] = fig
|
38 |
explanations[speaker_id]['bigfive'] = bigfive_data.explanation
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
# Attachment Dimensions (Radar Chart)
|
42 |
dimensions_data = data['attachments']
|