File size: 405 Bytes
8bbe3aa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
from base_model.retriever import Retriever
if __name__ == '__main__':
# Initialize retriever
r = Retriever()
# Retrieve example
retrieved = r.retrieve(
"When is a stochastic process said to be stationary?")
for i, (score, result) in enumerate(retrieved):
print(f"Result {i+1} (score: {score * 100:.02f}:")
print(result['text'][0])
print() # Newline
|