faster-whisper-GUI-main
I just started to learn programming, in the run of this faster-whisper-GUI-main project, according to the readme file installed dependency, but there is an error log, can you help me answer it thank you!faster-whisper-GUI/README.md at main · CheshireCC/faster-whisper-GUI · GitHub屏幕截图 2024-11-06 2037491220×110 13.8 KB
2024-11-06T14:16:20Z
There is something important to remember when learning programming. You must never trust anything other than the code that is actually running. You should basically assume that manuals and samples are not 100% true.This time, there is a lack of dependencies. First, let’s install transformers.pip install -U transformers
2024-11-07T01:07:42Z
But I used the pip list statement to check, I already have transformer installed, so I’m confused.
2024-11-07T01:54:33Z
In that case, it might be a bug in the library.What often happens is that the location of the module changes with an upgrade, but in this case, the location has not changed even with the latest version.github.comhuggingface/transformers/blob/main/src/transformers/pipelines/pt_utils.pyimport numpy as np
import torch
from torch.utils.data import Dataset, IterableDataset

from ..utils.generic import ModelOutput


class PipelineDataset(Dataset):
    def __init__(self, dataset, process, params):
        self.dataset = dataset
        self.process = process
        self.params = params

    def __len__(self):
        return len(self.dataset)

    def __getitem__(self, i):
        item = self.dataset[i]
        processed = self.process(item, **self.params)
        return processedThis file has been truncated.show originalWhich file on github has that line?