Spaces:
Runtime error
Runtime error
File size: 360 Bytes
56523b5 |
1 2 3 4 5 6 7 8 9 10 11 12 |
from retrieval.retrieval import Retrieval, BM25
# retrieval = Retrieval(k=4)
# contexts = retrieval.get_context()
docs = open('../document2.txt', encoding='utf-8').read()
retrieval = Retrieval(docs=docs)
# retrieval.tuning(docs)
contexts = retrieval.get_context("Khi nào bệnh nhên nên đến bệnh viện?")
for context in contexts:
print(context) |