Just a suggestion, but e.g. here: https://huggingface.co/cardiffnlp/twitter-roberta-base-emoji/blob/main/config.json, if id2label and label2id were setup correctly, one wouldn't have to separately load the mappings.txt file from this github repo, and do the mapping manually.