File size: 490 Bytes
c298327
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""Sonata processor: ``SonataFeatureExtractor`` (the package's inference transform) as its only part."""

from transformers.processing_utils import ProcessorMixin


class SonataProcessor(ProcessorMixin):
    attributes = ["feature_extractor"]

    def __init__(self, feature_extractor=None, **kwargs):
        super().__init__(feature_extractor, **kwargs)

    def __call__(self, point=None, **kwargs):
        return self.feature_extractor(point, **kwargs)


__all__ = ["SonataProcessor"]