Download quickstart.py from WangKaiLin/PipeOwl: direct link, hf CLI and curl.
- Browser
- Download file 358 Bytes
-
https://huggingface.co/WangKaiLin/PipeOwl/resolve/main/quickstart.py
- Command line
-
hf download hf://WangKaiLin/PipeOwl/quickstart.py
-
curl -L -o quickstart.py https://huggingface.co/WangKaiLin/PipeOwl/resolve/main/quickstart.py
358 Bytes
| 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() | |