CoolFace
Apppublic

wasimmadha/entity-extraction

sourceHugging Faceupdated 3y agoView on Hugging Face
2likes
dataset.py13 linesDownload Raw Back to root
1from torch.utils.data import Dataset2 3# Create a custom dataset class that takes a single input sample4class SingleInputDataset(Dataset):5    def __init__(self, input_single):6        self.sample = input_single7        8    def __len__(self):9        return 110    11    def __getitem__(self, index):12        return self.sample13