Spaces:
Runtime error
Runtime error
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()) |