Time Series Forecasting
Transformers
PyTorch
Korean
jnu_tsb
feature-extraction
jnu-tsb
time-series
forecasting
chronos-2
polyglot-ko
korean
finance
covariates
r
reticulate
education
custom_code
Instructions to use HONGRIZON/JNU-TSB with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HONGRIZON/JNU-TSB with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("HONGRIZON/JNU-TSB", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download handler.py from HONGRIZON/JNU-TSB: direct link, hf CLI and curl.
- Browser
- Download file 608 Bytes
-
https://huggingface.co/HONGRIZON/JNU-TSB/resolve/main/handler.py
- Command line
-
hf download hf://HONGRIZON/JNU-TSB/handler.py
-
curl -L -o handler.py https://huggingface.co/HONGRIZON/JNU-TSB/resolve/main/handler.py
608 Bytes
| from __future__ import annotations | |
| from typing import Any, Dict | |
| try: | |
| from .runtime import JNUTSBRuntime | |
| except ImportError: # pragma: no cover | |
| from runtime import JNUTSBRuntime | |
| class EndpointHandler: | |
| """Hugging Face Inference Endpoint custom handler.""" | |
| def __init__(self, model_dir: str, **kwargs: Any) -> None: | |
| self.runtime = JNUTSBRuntime.from_config_dir(model_dir) | |
| def __call__(self, data: Dict[str, Any]) -> Any: | |
| inputs = data.get("inputs", data) | |
| parameters = data.get("parameters", {}) | |
| return self.runtime.predict(inputs=inputs, **parameters) | |