Download examples/basic_inference.py from techkiyan/kiyannet-100M: direct link, hf CLI and curl.
- Browser
- Download file 418 Bytes
-
https://huggingface.co/techkiyan/kiyannet-100M/resolve/main/examples/basic_inference.py
- Command line
-
hf download hf://techkiyan/kiyannet-100M/examples/basic_inference.py
-
curl -L -o basic_inference.py https://huggingface.co/techkiyan/kiyannet-100M/resolve/main/examples/basic_inference.py
418 Bytes
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parents[1])) | |
| from inference import KiyanNetExtractor | |
| model = KiyanNetExtractor.from_pretrained( | |
| "techkiyan/kiyannet-100M", | |
| device="cuda", | |
| precision="amp", | |
| ) | |
| result = model.extract( | |
| title="Company reports strong quarterly earnings", | |
| description="The company reported higher revenue and profit.", | |
| ) | |
| print(result) | |