Spaces:
Runtime error
Runtime error
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) |