olyandrevn commited on
Commit
9b21daf
1 Parent(s): 791eb84
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -45,19 +45,19 @@ def bot(history, api_kind):
45
  # Retrieve documents relevant to query
46
  document_start = perf_counter()
47
 
48
- documents = retrieve(query, TOP_K)
49
 
50
  document_time = perf_counter() - document_start
51
  logger.info(f'Finished Retrieving documents in {round(document_time, 2)} seconds...')
52
 
53
  logger.info('Reranking documents...')
54
- # # Retrieve documents relevant to query
55
- # document_start = perf_counter()
56
 
57
- # documents = rerank(query, documents, TOP_K)
58
 
59
- # document_time = perf_counter() - document_start
60
- # logger.info(f'Finished Reranking documents in {round(document_time, 2)} seconds...')
61
 
62
  # Create Prompt
63
  prompt = template.render(documents=documents, query=query)
 
45
  # Retrieve documents relevant to query
46
  document_start = perf_counter()
47
 
48
+ documents = retrieve(query, TOP_N)
49
 
50
  document_time = perf_counter() - document_start
51
  logger.info(f'Finished Retrieving documents in {round(document_time, 2)} seconds...')
52
 
53
  logger.info('Reranking documents...')
54
+ # Retrieve documents relevant to query
55
+ document_start = perf_counter()
56
 
57
+ documents = rerank(query, documents, TOP_K)
58
 
59
+ document_time = perf_counter() - document_start
60
+ logger.info(f'Finished Reranking documents in {round(document_time, 2)} seconds...')
61
 
62
  # Create Prompt
63
  prompt = template.render(documents=documents, query=query)