samarthagarwal23 commited on
Commit
b37de3c
1 Parent(s): 5aa1bf9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -13,7 +13,9 @@ import pdfminer
13
  from pdfminer.high_level import extract_text
14
 
15
  len_doc = 500
16
- overlap = 30
 
 
17
 
18
  qa_model = pipeline("question-answering",
19
  #model = "deepset/minilm-uncased-squad2")
@@ -86,7 +88,7 @@ def final_qa_pipeline(file, query):
86
 
87
  bm25 = BM25Okapi(tokenized_corpus)
88
 
89
- top_k_retriver, top_k_ranker = 20,3
90
  lvl1 = retrieval(query, top_k_retriver, docs, bm25)
91
 
92
  if len(lvl1) > 0:
 
13
  from pdfminer.high_level import extract_text
14
 
15
  len_doc = 500
16
+ overlap = 15
17
+ param_top_k_retriver = 15
18
+ param_top_k_ranker = 3
19
 
20
  qa_model = pipeline("question-answering",
21
  #model = "deepset/minilm-uncased-squad2")
 
88
 
89
  bm25 = BM25Okapi(tokenized_corpus)
90
 
91
+ top_k_retriver, top_k_ranker = param_top_k_retriver, param_top_k_ranker
92
  lvl1 = retrieval(query, top_k_retriver, docs, bm25)
93
 
94
  if len(lvl1) > 0: