samarthagarwal23 commited on
Commit
4912f11
1 Parent(s): f5b0b68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -29,7 +29,7 @@ def read_pdf(file):
29
  # We use BM25 as retriver which will do 1st round of candidate filtering based on word based matching
30
 
31
  def bm25_tokenizer(text):
32
- stop_w = ['a', 'the', 'am', 'is' , 'are', 'who', 'how', 'where', 'when', 'why']
33
  tokenized_doc = []
34
  for token in text.lower().split():
35
  token = token.strip(string.punctuation)
@@ -84,8 +84,8 @@ def final_qa_pipeline(file, query):
84
 
85
  examples = [
86
  [os.path.abspath("NASDAQ_AAPL_2020.pdf"), "how much are the outstanding shares?"],
87
- [os.path.abspath("NASDAQ_MSFT_2020.pdf"), "how much was the profit?"],
88
- [os.path.abspath("dbs-annual-report-2020.pdf"), "What is the shareholder equity?"],
89
  ]
90
 
91
  iface = gr.Interface(
 
29
  # We use BM25 as retriver which will do 1st round of candidate filtering based on word based matching
30
 
31
  def bm25_tokenizer(text):
32
+ stop_w = ['a', 'the', 'am', 'is' , 'are', 'who', 'how', 'where', 'when', 'why', 'what']
33
  tokenized_doc = []
34
  for token in text.lower().split():
35
  token = token.strip(string.punctuation)
 
84
 
85
  examples = [
86
  [os.path.abspath("NASDAQ_AAPL_2020.pdf"), "how much are the outstanding shares?"],
87
+ [os.path.abspath("NASDAQ_MSFT_2020.pdf"), "what was the income before taxes?"],
88
+ [os.path.abspath("dbs-annual-report-2020.pdf"), "how much dividend was paid to shareholders??"],
89
  ]
90
 
91
  iface = gr.Interface(