Spaces:
Sleeping
Sleeping
vickeee465
commited on
Commit
·
c275808
1
Parent(s):
93eecfb
short versions of y labels
Browse files
app.py
CHANGED
@@ -91,7 +91,7 @@ def prepare_heatmap_data(data):
|
|
91 |
emotion = id2label[idy]
|
92 |
heatmap_data.at[idx, emotion] = confidence
|
93 |
|
94 |
-
heatmap_data.index = [item["sentence"] for item in data]
|
95 |
return heatmap_data
|
96 |
|
97 |
def plot_emotion_heatmap(heatmap_data):
|
|
|
91 |
emotion = id2label[idy]
|
92 |
heatmap_data.at[idx, emotion] = confidence
|
93 |
|
94 |
+
heatmap_data.index = [item["sentence"][:18]+"..." for item in data]
|
95 |
return heatmap_data
|
96 |
|
97 |
def plot_emotion_heatmap(heatmap_data):
|