Update quickstart.py
Browse files- quickstart.py +16 -16
quickstart.py
CHANGED
|
@@ -1,16 +1,16 @@
|
|
| 1 |
-
from
|
| 2 |
-
|
| 3 |
-
engine = PipeOwlEngine(PipeOwlConfig())
|
| 4 |
-
|
| 5 |
-
while True:
|
| 6 |
-
query = input("請輸入句子: ")
|
| 7 |
-
|
| 8 |
-
out = engine.pipeowl(query, top_k=5)
|
| 9 |
-
|
| 10 |
-
print("\nTop-K Tokens:")
|
| 11 |
-
for text, score in out["retrieved"]:
|
| 12 |
-
print(f"{score:.3f} | {text}")
|
| 13 |
-
|
| 14 |
-
print("\nDecoded:")
|
| 15 |
-
print(out["decoded"])
|
| 16 |
-
print()
|
|
|
|
| 1 |
+
from engine import PipeOwlEngine, PipeOwlConfig
|
| 2 |
+
|
| 3 |
+
engine = PipeOwlEngine(PipeOwlConfig())
|
| 4 |
+
|
| 5 |
+
while True:
|
| 6 |
+
query = input("請輸入句子: ")
|
| 7 |
+
|
| 8 |
+
out = engine.pipeowl(query, top_k=5)
|
| 9 |
+
|
| 10 |
+
print("\nTop-K Tokens:")
|
| 11 |
+
for text, score in out["retrieved"]:
|
| 12 |
+
print(f"{score:.3f} | {text}")
|
| 13 |
+
|
| 14 |
+
print("\nDecoded:")
|
| 15 |
+
print(out["decoded"])
|
| 16 |
+
print()
|