samarthagarwal23 commited on
Commit
88e7436
·
1 Parent(s): 0e90d70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -62,9 +62,7 @@ def qa_ranker(query, docs_, top_k_ranker):
62
  return sorted(ans, key=lambda x: x['score'], reverse=True)[:top_k_ranker]
63
 
64
  def print_colored(text, start_idx, end_idx):
65
- a = colored(text[:start_idx]) + \
66
- colored(text[start_idx:end_idx], 'red', 'on_yellow') + \
67
- colored(text[end_idx:]))
68
  return a
69
 
70
  def final_qa_pipeline(file, query):
 
62
  return sorted(ans, key=lambda x: x['score'], reverse=True)[:top_k_ranker]
63
 
64
  def print_colored(text, start_idx, end_idx):
65
+ a = colored(text[:start_idx]) + colored(text[start_idx:end_idx], 'red', 'on_yellow') + colored(text[end_idx:])
 
 
66
  return a
67
 
68
  def final_qa_pipeline(file, query):