Download src/models/base.py from abashar/price: direct link, hf CLI and curl.
- Browser
- Download file 497 Bytes
-
https://huggingface.co/spaces/abashar/price/resolve/main/src/models/base.py
- Command line
-
hf download hf://spaces/abashar/price/src/models/base.py
-
curl -L -o base.py https://huggingface.co/spaces/abashar/price/resolve/main/src/models/base.py
497 Bytes
| from abc import abstractmethod | |
| from typing import Any, Tuple, List, Dict, Union | |
| from src.misc.schemas import ProductNamedEntityExtractionSchema | |
| class BaseModel: | |
| def __init__(self) -> None: | |
| pass | |
| def __call__( | |
| self, input_query: str, *args: Any, **kwds: Any | |
| ) -> ProductNamedEntityExtractionSchema: | |
| return self.predict(input_query=input_query) | |
| def predict(self, input_query, *args: Any, **kwds: Any): | |
| raise NotImplementedError | |