Spaces:
Runtime error
Runtime error
update from https://github.com/ArneBinder/argumentation-structure-identification/pull/529
d868d2e verified Download src/serializer/interface.py from ArneBinder/ScientificArgumentRecommender: direct link, hf CLI and curl.
- Browser
- Download file 498 Bytes
-
https://huggingface.co/spaces/ArneBinder/ScientificArgumentRecommender/resolve/main/src/serializer/interface.py
- Command line
-
hf download hf://spaces/ArneBinder/ScientificArgumentRecommender/src/serializer/interface.py
-
curl -L -o interface.py https://huggingface.co/spaces/ArneBinder/ScientificArgumentRecommender/resolve/main/src/serializer/interface.py
498 Bytes
| from abc import ABC, abstractmethod | |
| from typing import Any, Iterable | |
| from pytorch_ie.core import Document | |
| class DocumentSerializer(ABC): | |
| """This defines the interface for a document serializer. | |
| The serializer should not return the serialized documents, but write them to disk and instead | |
| return some metadata such as the path to the serialized documents. | |
| """ | |
| def __call__(self, documents: Iterable[Document], append: bool = False, **kwargs) -> Any: ... | |