File size: 418 Bytes
7044fe6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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)