another minor fix
Browse files- handler.py +3 -2
handler.py
CHANGED
|
@@ -21,8 +21,9 @@ def _load_spacy_model(name: str) -> spacy.Language:
|
|
| 21 |
|
| 22 |
|
| 23 |
class EndpointHandler:
|
| 24 |
-
def __init__(self,
|
| 25 |
-
|
|
|
|
| 26 |
|
| 27 |
def __call__(self, data: dict[str, Any]) -> dict[str, Any]:
|
| 28 |
inputs: str = data.pop("inputs", "")
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
class EndpointHandler:
|
| 24 |
+
def __init__(self, path: str = ""):
|
| 25 |
+
print(f"EndpointHandler(path='{path}')")
|
| 26 |
+
self._nlp: spacy.Language = _load_spacy_model(name="en_core_web_lg")
|
| 27 |
|
| 28 |
def __call__(self, data: dict[str, Any]) -> dict[str, Any]:
|
| 29 |
inputs: str = data.pop("inputs", "")
|