File size: 375 Bytes
bfd0772
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from .engine import PipeOwlEngine, PipeOwlConfig

engine = PipeOwlEngine(PipeOwlConfig())

while True:
    query = input("請輸入句子: ")

    out = engine.pipeowl(query, top_k=5)

    print("\nTop-K Tokens:")
    for text, score in out["retrieved"]:
        print(f"{score:.3f} | {text}")

    print("\nDecoded:")
    print(out["decoded"])
    print()