Spaces:
Runtime error
Runtime error
File size: 412 Bytes
01f65eb |
1 2 3 4 5 6 7 8 9 10 11 12 |
import json
class Utility:
def read_emotion_list(self):
with open('./emotion_mapping_finalized.json') as emo_mapping_file:
finalized_emotions = json.load(emo_mapping_file)
emotions_mapping = {}
for key, values in finalized_emotions.items():
for emotion in values:
emotions_mapping[emotion] = key
return list(finalized_emotions.keys()) |