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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -83,15 +83,17 @@ def final_qa_pipeline(file, query):
83
  return ("No match", 0)
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(
92
  fn = final_qa_pipeline,
93
  inputs = [gr.inputs.File(label="input pdf file"), gr.inputs.Textbox(label="Question:")],
94
- outputs = [gr.outputs.HTML(label="Answer"), gr.outputs.HTML(label="Score"), gr.outputs.HTML(label="doc")],
95
  examples=examples,
96
  )
97
  iface.launch()
 
83
  return ("No match", 0)
84
 
85
  examples = [
86
+ [os.path.abspath("NASDAQ_AAPL_2020.pdf"), "how much are the outstanding shares ?"],
87
+ [os.path.abspath("NASDAQ_AAPL_2020.pdf"), "How high is shareholders equity ?"],
88
+ [os.path.abspath("NASDAQ_AAPL_2020.pdf"), "what is competitors strategy ?"],
89
+ [os.path.abspath("dbs-annual-report-2020.pdf"), "how much dividend was paid to shareholders ?"],
90
+ [os.path.abspath("dbs-annual-report-2020.pdf"), "what are the key risks ?"],
91
  ]
92
 
93
  iface = gr.Interface(
94
  fn = final_qa_pipeline,
95
  inputs = [gr.inputs.File(label="input pdf file"), gr.inputs.Textbox(label="Question:")],
96
+ outputs = [gr.outputs.HTML(label="Answer"), gr.outputs.HTML(label="Score"), gr.outputs.HTML(label="Reference text")],
97
  examples=examples,
98
  )
99
  iface.launch()