You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
406 B
Python

# another_file.py
import time
start_time = time.time()
from qa_amend import QAService, match_query
kb_name = 'my_kb_test'
device = None
qa_service = QAService(kb_name, device)
query = "你有哪里不舒服?"
top_k = 1
score_threshold = 0.1
match_query(qa_service, query, top_k, 1 - score_threshold)
end_time = time.time()
elapsed_time = end_time - start_time
print(f"总耗时: {elapsed_time}")