import os import torch import pickle import numpy as np from PIL import Image, ImageDraw, ImageFont from ..utils.utilities import Utility class GoEmotionsDataset(torch.utils.data.Dataset): util = Utility() def __init__(self, embeddings, labels): self.labels = labels self.instances = embeddings def __len__(self): return self.instances.shape[0] def __getitem__(self, idx): return self.instances[idx], self.labels[idx]