Spaces:
Running on Zero
Running on Zero
Download espnet/transform/transform_interface.py from Tom-Brenner/PhonePaint: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/spaces/Tom-Brenner/PhonePaint/resolve/main/espnet/transform/transform_interface.py
- Command line
-
hf download hf://spaces/Tom-Brenner/PhonePaint/espnet/transform/transform_interface.py
-
curl -L -o transform_interface.py https://huggingface.co/spaces/Tom-Brenner/PhonePaint/resolve/main/espnet/transform/transform_interface.py
466 Bytes
| # TODO(karita): add this to all the transform impl. | |
| class TransformInterface: | |
| """Transform Interface""" | |
| def __call__(self, x): | |
| raise NotImplementedError("__call__ method is not implemented") | |
| def add_arguments(cls, parser): | |
| return parser | |
| def __repr__(self): | |
| return self.__class__.__name__ + "()" | |
| class Identity(TransformInterface): | |
| """Identity Function""" | |
| def __call__(self, x): | |
| return x | |